faster-whisper-server / Dockerfile.cuda
Fedir Zadniprovskyi
feat: allow using any ctraslate2 compatible model #14
c8f37a4
raw
history blame
900 Bytes
FROM nvidia/cuda:12.2.2-cudnn8-runtime-ubuntu22.04
# hadolint ignore=DL3008,DL3015,DL4006
RUN apt-get update && \
apt-get install -y curl software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends python3.12 python3.12-distutils && \
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir poetry==1.8.3
WORKDIR /root/faster-whisper-server
COPY pyproject.toml poetry.lock ./
RUN poetry install --only main
COPY ./faster_whisper_server ./faster_whisper_server
ENTRYPOINT ["poetry", "run"]
CMD ["uvicorn", "faster_whisper_server.main:app"]
ENV WHISPER_MODEL=Systran/faster-distil-whisper-large-v3
ENV WHISPER_INFERENCE_DEVICE=cuda
ENV UVICORN_HOST=0.0.0.0
ENV UVICORN_PORT=8000