-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (26 loc) · 868 Bytes
/
Copy pathDockerfile
File metadata and controls
33 lines (26 loc) · 868 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM nvcr.io/nvidia/tensorrt:23.08-py3
WORKDIR /app
# Set in environment in case we need to build any extensions
ENV TORCH_CUDA_ARCH_LIST="6.0;6.1;6.2;7.0;7.2;7.5;8.0;8.6;8.9;9.0+PTX"
# Install zstd and git-lfs for model compression and distribution
RUN apt-get update && apt-get install -y \
git-lfs \
libavcodec-dev \
libavdevice-dev \
libavfilter-dev \
libavformat-dev \
libavutil-dev \
libswresample-dev \
libswscale-dev \
pkg-config \
zstd \
&& rm -rf /var/lib/apt/lists/*
# Install our torch ver matching cuda
RUN --mount=type=cache,target=/root/.cache pip install torch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2
COPY requirements.txt .
# Run pip install with cache so we speedup subsequent rebuilds
RUN --mount=type=cache,target=/root/.cache pip install -r requirements.txt
COPY . .
CMD ./entrypoint.sh
EXPOSE 19000
EXPOSE 19001