Spaces:
Sleeping
Sleeping
File size: 1,088 Bytes
3893ec5 63d0152 79f1f8d 0aababd 313814b 0aababd d0feed8 3d5e897 7f4d499 39ee116 2393ed2 974e6f9 20b7748 9f56267 1012724 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
FROM ubuntu:24.04
LABEL org.opencontainers.image.source="https://github.com/fedirz/faster-whisper-server"
# `ffmpeg` is installed because without it `gradio` won't work with mp3(possible others as well) files
# hadolint ignore=DL3008
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ffmpeg python3.12 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY --from=ghcr.io/astral-sh/uv:0.4.20 /uv /bin/uv
WORKDIR /root/faster-whisper-server
# https://docs.astral.sh/uv/guides/integration/docker/#intermediate-layers
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=uv.lock,target=uv.lock \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
uv sync --frozen --no-install-project
COPY ./src ./pyproject.toml ./uv.lock ./
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen --extra ui
ENV WHISPER__MODEL=Systran/faster-whisper-small
ENV UVICORN_HOST=0.0.0.0
ENV UVICORN_PORT=8000
CMD ["uv", "run", "uvicorn", "--factory", "faster_whisper_server.main:create_app"]
|