Files
caption-local/Dockerfile.gpu
kawaiipunk 5bee28c407 Update the GPU image to CUDA 12.9.2
Move the CUDA cuDNN runtime base from 12.8.1 to 12.9.2 within the CUDA 12
line, keeping the same driver requirement and 12.x wheels.
2026-10-16 16:09:40 +00:00

21 lines
846 B
Docker

FROM nvidia/cuda:12.9.2-cudnn-runtime-ubuntu24.04
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 HF_HOME=/models HF_HUB_DISABLE_TELEMETRY=1 \
CAPTION_DEVICE=cuda PATH=/opt/venv/bin:$PATH
RUN apt-get update && apt-get install -y --no-install-recommends python3 python3-venv libgomp1 \
&& rm -rf /var/lib/apt/lists/* \
&& python3 -m venv /opt/venv \
&& useradd --uid 10001 --create-home caption \
&& mkdir /models && chown caption:caption /models
WORKDIR /app
COPY requirements-linux.lock .
RUN pip install --no-cache-dir -r requirements-linux.lock
COPY server.py api_compat.py healthcheck.py ./
COPY static/ static/
COPY LICENSE .
USER 10001:10001
EXPOSE 8765
HEALTHCHECK --interval=10s --timeout=5s --start-period=300s --retries=3 \
CMD python healthcheck.py
ENTRYPOINT ["python", "server.py"]
CMD ["--host", "0.0.0.0"]