Spaces:
Runtime error
Runtime error
Download Dockerfile from hbs2/0100: direct link, hf CLI and curl.
- Browser
- Download file 1.13 kB
-
https://huggingface.co/spaces/hbs2/0100/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/hbs2/0100/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/hbs2/0100/resolve/main/Dockerfile
1.13 kB
| # Stage 1: Builder | |
| FROM nvidia/cuda:12.3.2-cudnn9-runtime-ubuntu22.04 AS builder | |
| WORKDIR /subgen | |
| ARG DEBIAN_FRONTEND=noninteractive | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| python3 \ | |
| python3-pip \ | |
| ffmpeg \ | |
| git \ | |
| tzdata \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements and install Python dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application code | |
| COPY . . | |
| # Stage 2: Runtime | |
| FROM nvidia/cuda:12.3.2-cudnn9-runtime-ubuntu22.04 | |
| WORKDIR /subgen | |
| # Copy necessary files from the builder stage | |
| COPY --from=builder /subgen/launcher.py . | |
| COPY --from=builder /subgen/subgen.py . | |
| COPY --from=builder /subgen/language_code.py . | |
| COPY --from=builder /usr/local/lib/python3.10/dist-packages /usr/local/lib/python3.10/dist-packages | |
| # Install runtime dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| ffmpeg \ | |
| python3 \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| ENV PYTHONUNBUFFERED=1 | |
| # Set command to run the application | |
| CMD ["python3", "launcher.py"] | |