-
Notifications
You must be signed in to change notification settings - Fork 192
/
Copy pathdev.gpu.Dockerfile
55 lines (45 loc) · 1.4 KB
/
dev.gpu.Dockerfile
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
ARG CUDA_VERSION="11.8.0"
ARG CUDNN_VERSION="8"
ARG UBUNTU_VERSION="22.04"
ARG MAX_JOBS=4
FROM nvidia/cuda:$CUDA_VERSION-cudnn$CUDNN_VERSION-devel-ubuntu$UBUNTU_VERSION
RUN mkdir -p /app/storage && ln -s /storage /app/storage # backward compatibility for (https://github.com/CatchTheTornado/text-extract-api/issues/85)
RUN apt-get update && \
apt-get install -y --no-install-recommends \
wget \
curl \
unzip \
git \
python3 \
python3-pip \
libgl1 \
libglib2.0-0 \
libglib2.0-dev \
curl \
gnupg2 \
ca-certificates \
apt-transport-https \
software-properties-common \
libreoffice \
libmagic1 \
libmagic-dev \
ffmpeg \
git-lfs \
xvfb \
&& ln -s /usr/bin/python3 /usr/bin/python \
&& apt-get update \
&& apt install python3-packaging \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
WORKDIR /app
RUN echo 'Acquire::http::Pipeline-Depth 0;\nAcquire::http::No-Cache true;\nAcquire::BrokenProxy true;\n' > /etc/apt/apt.conf.d/99fixbadproxy
RUN apt-get clean && rm -rf /var/lib/apt/lists/* \
&& apt-get update --fix-missing \
&& apt-get install -y \
libgl1-mesa-glx \
poppler-utils \
libpoppler-cpp-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
EXPOSE 8000
ENTRYPOINT ["/app/scripts/entrypoint.sh"]