1
Fork 0
This repository has been archived on 2026-08-15. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
2026SEL3-project-Brittle_St.../.devcontainer/Dockerfile
Tibo De Peuter ff462d867a
fix: Use local dirname
Use local dirname for devcontainer mounting
2026-03-21 17:26:56 +01:00

30 lines
1 KiB
Docker

FROM mcr.microsoft.com/devcontainers/python:3.12
# Install uv for dependency management
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
# Install system dependencies for JAX, OpenGL, and Mujoco
RUN apt-get update && apt-get install -y --no-install-recommends \
libgl1 \
libosmesa6-dev \
libglew-dev \
libglfw3 \
patchelf \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Set environment variables for hardware acceleration and rendering
ENV LD_LIBRARY_PATH=/usr/lib/nvidia
ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility,graphics
# Set the workspace path (defaults to /workspaces/project but can be overridden)
ARG WORKSPACE_PATH=/workspaces/project
ENV WORKSPACE_PATH=$WORKSPACE_PATH
ENV PATH="$WORKSPACE_PATH/.venv/bin:$PATH"
# Ensure the workspace and .venv directories exist and are owned by the vscode user
# This prevents permission errors when the postCreateCommand runs uv sync
RUN mkdir -p $WORKSPACE_PATH/.venv && chown -R vscode:vscode $WORKSPACE_PATH
USER vscode
WORKDIR $WORKSPACE_PATH