Add GPU-enabled Scene Search container

This commit is contained in:
Sleeps
2026-10-06 18:30:32 +01:00
parent d36a18870f
commit 301653804a
+23
View File
@@ -0,0 +1,23 @@
FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends ffmpeg curl ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt /app/requirements.txt
# Install a CUDA-enabled PyTorch wheel explicitly; the NVIDIA container runtime
# supplies access to the host driver/GPU.
RUN python -m pip install --upgrade pip \
&& python -m pip install "torch>=2.4" --index-url https://download.pytorch.org/whl/cu124 \
&& python -m pip install -r /app/requirements.txt
COPY scene_search /app/scene_search
CMD ["python", "-m", "scene_search.cli", "serve"]