-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (32 loc) · 1.28 KB
/
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
FROM nvidia/cuda:11.7.1-cudnn8-runtime-ubuntu20.04
RUN rm -f /etc/apt/sources.list.d/*.list
SHELL ["/bin/bash", "-c"]
ENV DEBIAN_FRONTEND=noninteractive
ENV SHELL=/bin/bash
WORKDIR /app
RUN apt-get update -y && \
apt-get upgrade -y && \
apt-get install --yes --no-install-recommends sudo ca-certificates git wget curl bash libgl1 libx11-6 software-properties-common ffmpeg build-essential -y &&\
apt-get autoremove -y && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*
RUN add-apt-repository ppa:deadsnakes/ppa -y && \
apt-get install python3.10-dev python3.10-venv python3-pip -y --no-install-recommends && \
ln -s /usr/bin/python3.10 /usr/bin/python && \
rm /usr/bin/python3 && \
ln -s /usr/bin/python3.10 /usr/bin/python3 && \
apt-get autoremove -y && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python get-pip.py && \
rm get-pip.py
COPY ./src/* ./
RUN --mount=type=cache,target=/root/.cache/pip \
pip install --upgrade pip && \
pip install -r ./requirements.txt --no-cache-dir && \
rm ./requirements.txt
ENV MODEL="Philogicae/whisper-large-v3-french-ct2"
ENV HF_HOME="/"
RUN python3 download_model.py
CMD ["python3", "./worker.py"]