-
-
Notifications
You must be signed in to change notification settings - Fork 78
/
gpu.Dockerfile
46 lines (37 loc) · 1.34 KB
/
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
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV DEBIAN_FRONTEND=noninteractive
# Install all dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
software-properties-common \
curl \
ffmpeg \
git \
libasound2-dev \
libmagic-dev \
libopenmpi-dev \
libsndfile-dev \
openmpi-bin \
rsync \
ssh \
wget \
&& add-apt-repository universe \
&& apt-get update
RUN apt-get -y install python3.9 python3.9-gdbm python3-distutils \
&& curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
&& python3.9 get-pip.py \
&& ln -s /usr/local/cuda-11.8/targets/x86_64-linux/lib/libcudart.so.11.0 /usr/lib/x86_64-linux-gnu/libcudart.so.11.0
RUN mkdir -p /webapp/media /webapp/staticfiles
WORKDIR /webapp
RUN pip3 install --upgrade pip
RUN pip3 install --upgrade wheel setuptools
RUN pip3 install torch==2.4.0 torchaudio==2.4.0 --index-url https://download.pytorch.org/whl/cu118
COPY requirements.txt requirements-spleeter.txt /webapp/
RUN pip3 install --upgrade pip -r requirements.txt
RUN pip3 install -r requirements-spleeter.txt --no-dependencies
COPY . .
COPY api-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/api-entrypoint.sh && ln -s /usr/local/bin/api-entrypoint.sh /
ENTRYPOINT ["api-entrypoint.sh"]