Skip to main content
A container-based environment is the best way to work on AI/ML projects. The eng-ai-agents repository provides pre-configured Docker containers with PyTorch, common ML libraries, and a uv-managed virtual environment.

Installing Docker

We recommend VS Code as your IDE due to its support for Dev Containers. Install Docker for your operating system:

Windows.

Install WSL and follow the instructions below to install Docker natively in WSL. Do not install Docker Desktop - all development must happen in the Ubuntu terminal.

Ubuntu

Follow the Docker Engine instructions. Never install Docker as a snap package. The snap version runs under strict AppArmor confinement that only permits bind mounts from a small allow-list.

Apple Silicon (M1/M2/M3/M4)

Install Docker Desktop. Macs with Apple Silicon can run course containers using Docker Desktop’s built-in ARM emulation. For most ML notebooks the CPU container (torch.dev.cpu) works well. For GPU-accelerated training, PyTorch supports Apple’s Metal Performance Shaders (MPS) backend, which uses the unified memory architecture of the M-series chips.

PyTorch with MPS acceleration

MPS acceleration is available when running PyTorch natively on macOS (outside Docker). To use it:
If a specific operation is not yet implemented in MPS, set this environment variable to fall back to CPU automatically:
MPS support is maturing but not all PyTorch operations are implemented yet. For operations that fail on MPS, the fallback variable ensures training continues on CPU without errors. Check the MPS backend documentation for the latest compatibility.

ROS on Mac

ROS2 does not run natively on macOS. Mac users must use the ros.dev.gpu Docker container for all robotics coursework. The container provides a full ROS2 Jazzy environment with GUI support via X11 forwarding or VNC. To enable GUI applications (RViz, Gazebo) on macOS, install XQuartz:
After installing, open XQuartz, go to Preferences > Security, and enable Allow connections from network clients. Then allow connections:

Course environment setup

  1. Import the repository to your own GitHub account
  2. Clone it locally and copy .env.example to .env
  3. Build and run the Docker container (make docker-build-gpu or make docker-build-cpu)
  4. Submit your work to Canvas/Brightspace via GitHub

Configuration

All Docker services read their configuration from a .env file in the repository root. Copy the example to get started:
Key variables:
The docker-compose.yml loads .env via env_file, making all variables available inside every container.
Never commit your .env file to git. It contains your API keys. The repository’s .gitignore already excludes it.

Docker Compose services

Three services are defined in docker-compose.yml: All services mount the repository as a workspace volume, so edits on the host are immediately reflected inside the container.

Build targets

Build containers using make from the repository root:

Run targets

Development setup

Once inside a container (or on the host with Python 3.11+), use these targets to set up the development environment:

Port mappings

Each service exposes ports for development tools:
Port mappings can be customized through environment variables in .env (e.g., DEV_JUPYTER_PORT=8888).