-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunner.Dockerfile
More file actions
40 lines (26 loc) · 1.36 KB
/
runner.Dockerfile
File metadata and controls
40 lines (26 loc) · 1.36 KB
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
34
35
36
37
38
39
40
FROM python:3.13-slim AS builder
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
RUN apt-get update && apt-get install -y --no-install-recommends git
WORKDIR /app
COPY lib ./lib/
# Install dependencies
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=runner/uv.lock,target=runner/uv.lock \
--mount=type=bind,source=runner/pyproject.toml,target=runner/pyproject.toml \
uv sync --locked --no-install-project --no-editable --compile-bytecode --project runner
ADD . /app
# Sync the project
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=.git,target=.git \
uv sync --locked --no-editable --compile-bytecode --project runner --extra not_dummy
FROM python:3.13-slim
RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg
# Copy licensing information
COPY ./README.md ./LICENSE.md ./COPYING.md /app/
# Copy the environment, but not the source code
COPY --from=builder --chown=app:app /app/runner/.venv /app/runner/.venv
# See https://github.com/m-bain/whisperX/issues/1304#issuecomment-3599713003
ENV TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD=true
# See https://github.com/m-bain/whisperX/blob/main/CUDNN_TROUBLESHOOTING.md#solution-1-add-to-ld_library_path-recommended
ENV LD_LIBRARY_PATH=/app/runner/.venv/lib/python3.13/site-packages/nvidia/cudnn/lib
CMD ["/app/runner/.venv/bin/project_W_runner"]