# CUDA uses nvidia/cuda as base — it IS Ubuntu 24.04 under the hood,
# but inheriting from kyokkou-base would mean installing CUDA from apt
# on top of plain Ubuntu, which works but fights the nvidia/cuda image design.
# Easier to accept the small bpy layer duplication here.
FROM docker.io/nvidia/cuda:12.6-runtime-ubuntu26.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
libx11-6 \
libxi6 \
libxkbcommon0 \
libxfixes3 \
libxrender1 \
libxxf86vm1 \
libxrandr2 \
libxext6 \
libxcb1 \
libxcb-util1 \
libgl1 \
libegl1 \
libdbus-1-3 \
libsm6 \
libice6 \
python3 \
python3-venv \
python3-pip \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN python3 -m pip install --break-system-packages bpy
COPY docker/agent/requirements.txt /agent/requirements.txt
RUN python3.13 -m pip install --break-system-packages -r /agent/requirements.txt
COPY docker/agent/ /agent/
EXPOSE 8080
CMD ["python3", "/agent/main.py"]