FROM nvidia/cuda:12.8.0-devel-ubuntu22.04

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y \
    python3.10 python3.10-dev python3-pip \
    build-essential git curl ffmpeg libgl1 libglib2.0-0 ninja-build \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /workspace

# Install sidecar runtime dependencies at build time.
COPY docker/figs/requirements.txt /tmp/figs-service-requirements.txt
RUN python3.10 -m pip install --no-cache-dir -r /tmp/figs-service-requirements.txt

# Keep image generic. FiGS source is mounted at runtime.
CMD ["bash"]
