forked from nextgrid/whisper-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.gpu
33 lines (24 loc) · 846 Bytes
/
Dockerfile.gpu
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 nvidia/cuda:11.6.0-base-ubuntu20.04
ENV PYTHON_VERSION=3.9
ENV POETRY_VERSION=1.2.0
ENV POETRY_VENV=/opt/poetry-venv
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get -qq update \
&& apt-get -qq install --no-install-recommends \
python${PYTHON_VERSION} \
python${PYTHON_VERSION}-venv \
python3-pip \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
RUN ln -s -f /usr/bin/python${PYTHON_VERSION} /usr/bin/python3 && \
ln -s -f /usr/bin/python${PYTHON_VERSION} /usr/bin/python && \
ln -s -f /usr/bin/pip3 /usr/bin/pip
RUN python3 -m venv $POETRY_VENV \
&& $POETRY_VENV/bin/pip install -U pip setuptools \
&& $POETRY_VENV/bin/pip install poetry==${POETRY_VERSION}
ENV PATH="${PATH}:${POETRY_VENV}/bin"
WORKDIR /app
COPY . /app
RUN poetry install
EXPOSE 8000
CMD [ "poetry", "run", "whisper_asr"]