# gpu-gate runs on the host's NVIDIA driver via NVML. Build a small image and
# run it with `--gpus all` so the container can see the cards:
#
#   docker build -t gpu-gate .
#   docker run --rm --gpus all gpu-gate status
#
FROM python:3.12-slim

LABEL org.opencontainers.image.source="https://github.com/jmweb-org/gpu-gate"
LABEL org.opencontainers.image.description="Wait for a free GPU, claim it, and run a command on it."
LABEL org.opencontainers.image.licenses="MIT"

WORKDIR /app
COPY pyproject.toml README.md LICENSE ./
COPY src ./src

RUN pip install --no-cache-dir .

ENTRYPOINT ["gpu-gate"]
CMD ["--help"]
