-
Notifications
You must be signed in to change notification settings - Fork 69
/
GPU.Dockerfile
50 lines (29 loc) · 1.73 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
47
48
49
50
FROM python:3.9 as requirements-stage
WORKDIR /tmp
COPY ./pyproject.toml ./poetry.lock* /tmp/
RUN curl -sSL https://install.python-poetry.org -o install-poetry.py
RUN python install-poetry.py --yes
ENV PATH="${PATH}:/root/.local/bin"
RUN poetry export -f requirements.txt --output requirements.txt --without-hashes
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.9
WORKDIR /app
RUN apt-get update && \
apt-get install -y --no-install-recommends ffmpeg portaudio19-dev python3-all-dev && \
rm -rf /var/lib/apt/lists/*
RUN curl -s http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/ | grep 'libssl1.1_1.1.1f-1ubuntu.*_amd64\.deb' | sort | head -n 1 | sed 's/.*\(libssl1\.1_1\.1\.1f-1ubuntu.*_amd64\.deb\).*/\1/' | xargs -I {} wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/{} -O libssl_latest.deb && \
dpkg -i libssl_latest.deb && \
rm libssl_latest.deb
ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.9.0/wait /app/wait
RUN chmod +x /app/wait && \
echo "./wait" >> /app/prestart.sh
COPY --from=requirements-stage /tmp/requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
RUN rm requirements.txt
COPY ./ /app/
WORKDIR /app
RUN git submodule update --init --recursive
RUN pip install --no-cache-dir --upgrade -r src/plugins/sing/requirements.txt && \
pip install --no-cache-dir torch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu117
RUN pip install --no-cache-dir paddlepaddle_gpu==2.5.1.post117 -f https://www.paddlepaddle.org.cn/whl/linux/cudnnin/stable.html && \
pip install --no-cache-dir tokenizers rwkv paddlespeech==1.4.1 numpy==1.22.4 typeguard==2.13.3
COPY ./ /app/