Complete step-by-step installation guide for RL Lab on macOS.
Estimated time: 10-15 minutes for first-time setup
Before you begin, make sure you have:
- macOS 14 (Sonoma) or newer recommended (older versions may work but are not officially supported by Docker)
- Administrator access to install software
- At least 4GB RAM (8GB recommended)
- At least 4GB free disk space
Terminal is where you'll type commands to set up the project.
- Press
Command (⌘) + Spaceon your keyboard - Type
Terminal - Press Enter
✅ Success Check: You should see a window with text like YourName@MacBook ~ %
macOS usually comes with Git pre-installed. Let's verify:
In Terminal, type this command and press Enter:
git --version✅ If you see something like this, Git is installed! Skip to Step 3:
git version 2.45.2
❌ If you see "command not found" or are prompted to install Command Line Tools:
Follow the official instructions:
https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
https://git-scm.com/install/mac
Alternative method - Install via command:
xcode-select --installAfter installation completes, verify again:
git --versionYou should now see the Git version number.
Docker runs the RL Lab application in an isolated environment, so you don't need to manually install Python, Node.js, or other dependencies.
- Open your web browser (Safari, Chrome, Firefox, etc.)
- Go to: https://www.docker.com/products/docker-desktop/
- Click "Download for Mac"
- For Apple Silicon (M1/M2/M3/M4): Choose "Mac with Apple Silicon"
- For Intel Mac: Choose "Mac with Intel chip"
- Not sure which you have? Click the Apple menu () → "About This Mac" and look at "Chip"
- Find the downloaded file in your Downloads folder
- Look for
Docker.dmg
- Look for
- Double-click
Docker.dmgto open it - A window appears showing the Docker icon and Applications folder
- Drag the Docker icon to the Applications folder
- Close the installer window
- You can eject the Docker disk image (right-click the Docker icon on desktop → Eject)
- Press
Command (⌘) + Spaceon your keyboard, type in Docker and open it - Or go to Applications folder
- Find and double-click Docker
- macOS may show a warning: "Docker is an app downloaded from the Internet. Are you sure you want to open it?"
- Click "Open"
- Enter your Mac password if prompted (this is normal for Docker)
- Docker Desktop will take 30-60 seconds to start
- You may see a "Docker Subscription Service Agreement" - click "Accept"
- You may be asked to create a Docker account - you can skip this (click "Continue without signing in" or similar)
✅ Success Check: Look for the Docker whale icon in your menu bar (top-right corner of screen). When Docker is running, the whale icon will be steady (not animating).
Click the whale icon - you should see "Docker Desktop is running"
- Open Terminal (see Step 1 if you closed it)
- Type this command and press Enter:
docker --version
✅ Success Check: You should see output like:
Docker version 29.0.1, build eedd969
❌ Troubleshooting:
- "docker: command not found": Docker Desktop might not be fully started. Wait a bit longer and try again.
- "Cannot connect to the Docker daemon": Docker Desktop is not running. Open Docker from Applications and wait for the whale icon to appear in the menu bar.
- Permission denied: You may need to add your user to the docker group or run Docker Desktop with administrator privileges.
Now you'll download the RL Lab project files to your computer.
First, decide where you want to save the project. Common locations:
- Desktop:
cd ~/Desktop - Documents:
cd ~/Documents - Or anywhere else you prefer!
- In Terminal, navigate to your chosen location. For example, to use Desktop:
cd ~/Desktop
Tip: ~ is a shortcut for your home folder (/Users/YourName)
Type this command and press Enter:
git clone https://github.com/aihpi/workshop-rl1-introduction.gitWhat you'll see: Git will download all the project files. This takes about 10-30 seconds.
Output should look like something like this (numbers might vary):
Cloning into 'workshop-rl1-introduction'...
remote: Enumerating objects: 543, done.
remote: Counting objects: 100% (543/543), done.
remote: Compressing objects: 100% (312/312), done.
remote: Total 543 (delta 215), reused 489 (delta 178), pack-reused 0
Receiving objects: 100% (543/543), 2.1 MiB | 5.2 MiB/s, done.
Resolving deltas: 100% (215/215), done.
Now move into the project folder:
cd workshop-rl1-introduction✅ Success Check: Type ls and press Enter. You should see folders and files like:
backend/ frontend/ docs/
README.md docker-compose.yml
❌ If git clone fails:
- Check your internet connection
- Make sure you typed the URL correctly
- Try again - sometimes network issues cause temporary failures
You're almost there! Now let's start RL Lab.
Before continuing, check that Docker Desktop is running:
- Look for the Docker whale icon in your menu bar (top-right)
- Click it - you should see "Docker Desktop is running"
- If it says "Docker Desktop is starting", wait until it's fully started
In Terminal (make sure you're still in the workshop-rl1-introduction folder), type:
docker-compose pull
docker-compose up -d(The pull downloads the latest RL Lab images - important if you have run RL Lab before, because up alone keeps using old images.)
Press Enter and wait...
First time running (~1-2 minutes):
- Docker will download pre-built images from the internet
- You'll see messages like:
Pulling backend...Pulling frontend...Creating workshop-rl1-introduction_backend_1Creating workshop-rl1-introduction_frontend_1Started
When ready, you'll see:
username@Mac workshop-rl1-introduction % docker compose up -d
[+] Running 3/3
✔ Network workshop-rl1-introduction_rl-network Created 0.0s
✔ Container workshop-rl1-introduction-backend Started 5.3s
✔ Container workshop-rl1-introduction-frontend Started
✅ Success: Your terminal is now free to use for other commands! The services are running in the background (detached mode with -d).
💡 Viewing logs (optional, for debugging): If you need to see what's happening or debug issues, open a separate terminal and run:
docker-compose logs -fThis shows live logs from both services. Press Control + C to stop viewing logs (the services keep running).
❌ Troubleshooting:
- "Cannot connect to Docker daemon": Docker Desktop is not running. Open it from Applications and wait for the whale icon to appear in menu bar.
- "Port 3030 is already allocated": Something else is using port 3030. Close other applications (especially other development servers) and try again.
- "Error response from daemon: pull access denied": Check your internet connection and try again.
🎉 You're ready to use RL Lab!
- Open your web browser (Safari, Chrome, Firefox - any browser works)
- In the address bar, type:
http://localhost:3030 - Press Enter
✅ Success! You should see the RL Lab interface:
Now that RL Lab is running, let's see it in action:
- Look at the default settings - The parameter panel on the left shows default values for the Q-Learning algorithm
- Click "Start Training" - Watch the agent learn in real-time!
- Environment viewer shows the agent's position in FrozenLake
- Reward chart shows learning progress
- Q-table heatmap shows learned values
- Wait for training to complete
- Click "Play Policy"
When you're done using RL Lab:
- Open Terminal (if you closed it)
- Navigate to the project folder:
cd ~/Desktop/workshop-rl1-introduction(or wherever you saved it) - Run:
docker-compose down - Wait for the containers to stop (you'll see "Stopped" and "Removed" messages)
To start again later, just:
- Open Terminal
- Navigate to the project folder:
cd ~/Desktop/workshop-rl1-introduction(or wherever you saved it) - Run:
docker-compose up -d
Symptoms: Docker icon in menu bar shows error, or never finishes starting
Solutions:
- Restart your Mac
- Check macOS version (must be 10.15 or newer)
- Make sure you downloaded the correct version (Apple Silicon vs Intel)
- Reinstall Docker Desktop
Solutions:
- Install Xcode Command Line Tools:
xcode-select --install - Wait for installation to complete
- Close Terminal and open a new one
Symptoms: Error messages like:
Error: bind: address already in use
Error starting userland proxy: listen tcp 0.0.0.0:3030: bind: address already in use
This means another program is already using port 3030 (frontend) or 5001 (backend).
Step 1 - Find what's using the port:
For port 3030:
lsof -i :3030For port 5001:
lsof -i :5001You'll see output like:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node 12345 username 23u IPv4 0x1234567 0t0 TCP *:3030 (LISTEN)
The PID (Process ID) is in the second column (e.g., 12345).
Step 2 - Find out what program it is:
The COMMAND column already shows you what's running (e.g., node, python, Docker).
Step 3 - Stop the process:
(If it is a docker container, try listing containers first: docker ps and stop with docker stop <container_id>)
Otherwise, try this command to kill the process:
kill 12345Replace 12345 with your actual PID.
Step 4 - Try starting RL Lab again:
docker-compose up -dIf you want to keep the other application running, change RL Lab's ports:
-
Open
docker-compose.yml -
Find these lines:
frontend: ports: - "3030:80" backend: ports: - "5001:5001"
-
Change to different ports (e.g., 3001 and 5002):
frontend: ports: - "3031:80" backend: ports: - "5002:5001"
-
Save the file
-
Start RL Lab:
docker-compose up -d -
Access at the new port:
http://localhost:3031
Common culprits using these ports:
- Port 3030: Less common, but could conflict with other services
- Port 5001: Flask apps, other Python servers, macOS AirPlay Receiver (very common!)
Solutions:
- Make sure Docker containers are running:
docker-compose ps - Wait a bit longer - first startup can take 2-3 minutes
- Try refreshing the browser
- Check Docker Desktop is running (look for whale icon in menu bar)
- View logs for error messages:
docker-compose logs
Symptoms: Slow performance or warnings about architecture
Solutions:
- Make sure you downloaded "Mac with Apple chip" version of Docker Desktop
- In Docker Desktop settings, ensure "Use Rosetta for x86/amd64 emulation on Apple Silicon" is checked
- Restart Docker Desktop
