CoolFace
Apppublic

hbs2/test

sourceHugging Facemitupdated 4mo agoView on Hugging Face
0likes
Dockerfile35 linesDownload Raw Back to root
1FROM nvidia/cuda:12.3.2-base-ubuntu22.042 3# Apt packages — own layer so pip changes don't re-run apt4RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \5    --mount=type=cache,target=/var/lib/apt,sharing=locked \6    apt-get update && apt-get install -y --no-install-recommends \7        ffmpeg python3 python3-pip curl gosu tzdata8 9# Torch — large and rarely changes; own layer so requirements.txt changes don't bust it10RUN --mount=type=cache,target=/root/.cache/pip \11    python3 -m pip install -U torch torchaudio --index-url https://download.pytorch.org/whl/cu12412 13# App dependencies — only rebuilds when requirements.txt changes14COPY requirements.txt /15RUN --mount=type=cache,target=/root/.cache/pip \16    python3 -m pip install -U -r /requirements.txt \17    && apt-get purge -y --auto-remove python3-pip \18    && rm -rf /var/lib/apt/lists/*19 20WORKDIR /subgen21 22# App files last — changes here don't bust the layers above23COPY launcher.py subgen.py language_code.py /subgen/24 25RUN mkdir -p /cache && chmod 777 /cache26 27ENV XDG_CACHE_HOME=/cache \28    HF_HOME=/cache/huggingface \29    MPLCONFIGDIR=/cache/matplotlib \30    PYTHONUNBUFFERED=131 32COPY entrypoint.sh /entrypoint.sh33ENTRYPOINT ["/entrypoint.sh"]34CMD ["python3", "launcher.py"]35