FROM python:3.11 # Install system dependencies for PyBullet/OpenGL + virtual display RUN apt-get update && apt-get install -y \ build-essential \ libgl1-mesa-dev \ libglew-dev \ libosmesa6-dev \ libgl1 \ patchelf \ git \ ffmpeg \ xvfb \ && rm -rf /var/lib/apt/lists/* WORKDIR /code # Copy requirements first for caching COPY requirements.txt . # Install Python dependencies # Note: PyTorch with CUDA support is handled by the requirements.txt index-url RUN pip install --no-cache-dir -r requirements.txt # Copy the rest of the application COPY . . # Set permissions RUN chmod +x train_liquid.py # Run the training script with virtual display CMD ["xvfb-run", "-a", "python", "train_liquid.py"]