prepare transcription API for GPU support (#34)
This commit is contained in:
32
transcription-api/Dockerfile.gpu
Normal file
32
transcription-api/Dockerfile.gpu
Normal file
@@ -0,0 +1,32 @@
|
||||
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04
|
||||
|
||||
ENV PYTHON_VERSION=3.11
|
||||
|
||||
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 \
|
||||
curl \
|
||||
&& 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
|
||||
|
||||
COPY requirements.txt requirements.txt
|
||||
RUN pip3 install -r requirements.txt \
|
||||
&& pip3 install python-multipart \
|
||||
&& pip3 install torch==1.13.0+cu117 -f https://download.pytorch.org/whl/torch
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=15s \
|
||||
CMD ["python3", "healthcheck.py"]
|
||||
|
||||
EXPOSE 8000
|
||||
CMD ["python3", "main.py"]
|
||||
Reference in New Issue
Block a user