- Hostname: vcm-48491.vm.duke.edu
- OS: Ubuntu 22.04
- Resources: 4 GB RAM, 2 processors
- Access: SSH with
ssh rz169@vcm-48491.vm.duke.edu - Important: VM powers down daily at 6:00 AM and needs manual restart via VCM portal
This deployment uses the recommended VSCode Dev Containers approach from the lean4game documentation.
SSH into your VM:
ssh rz169@vcm-48491.vm.duke.eduInstall Docker:
# Install Docker engine following official instructions
sudo apt-get update
sudo apt-get install docker.io
# Add user to docker group
sudo usermod -aG docker $USER
# Log out and back in for group changes to take effectInstall VSCode Server (for remote development):
# VSCode Server will be installed automatically when you connect via Remote SSHClone the game repository:
git clone https://github.com/yourusername/LinearAlgebraGame.git
cd LinearAlgebraGameConnect to the VM using VSCode Remote SSH:
- Install "Remote - SSH" extension in your local VSCode
- Connect to
rz169@vcm-48491.vm.duke.edu - Open the
/home/rz169/LinearAlgebraGamefolder - Install the Dev Containers extension on the remote VSCode
- When prompted, click "Reopen in Container" (or use Command Palette: "Dev Containers: Reopen in Container")
- First startup takes 2-15 minutes while building the container
- The game will automatically start on port 3000
Once the Dev Container is running, access your game at:
http://vcm-48491.vm.duke.edu:3000/
Or directly to the game:
http://vcm-48491.vm.duke.edu:3000/#/g/local/game
# List running containers
docker ps
# List all containers (including stopped)
docker ps -a# Find the container name/ID first
docker ps
# Then view logs
docker logs [container-id]From VSCode:
- Open Command Palette (Ctrl+Shift+P)
- Run "Dev Containers: Rebuild Container"
From terminal:
# Find and restart the container
docker restart [container-id]To update your game with new changes:
-
In VSCode Dev Container terminal:
git pull # Get latest changes lake build # Rebuild the game
-
Reload the browser to see changes at http://vcm-48491.vm.duke.edu:3000/
Alternatively, rebuild the entire container:
- Command Palette: "Dev Containers: Rebuild Container"
The VM automatically shuts down at 6:00 AM daily. To restart:
- Go to your VCM reservation portal
- Click "Power On" for your VM
- Wait 1-2 minutes for boot
- Reconnect via VSCode Remote SSH
- Reopen the folder in Dev Container when prompted
- The game will start automatically on port 3000
To verify after power-on:
ssh rz169@vcm-48491.vm.duke.edu
docker ps # Should show the Dev Container runningImportant: The VM is NOT backed up and will be destroyed at semester end!
-
Use Git for all changes:
cd ~/LinearAlgebraGame git add . git commit -m "Your changes" git push origin main
-
Regular backup to your local machine:
# From your local machine rsync -avz rz169@vcm-48491.vm.duke.edu:~/LinearAlgebraGame/ ~/LinearAlgebraGame-backup/
-
Backup game progress/data (if applicable):
# On the VM tar -czf game-backup-$(date +%Y%m%d).tar.gz ~/LinearAlgebraGame # Copy to your Duke network storage or local machine
# Check Docker status
sudo systemctl status docker
# Check for port conflicts
sudo netstat -tulpn | grep 3000
# Clean up old containers
docker container prune
# In VSCode, try:
# 1. Command Palette: "Dev Containers: Rebuild Container Without Cache"
# 2. If that fails, manually remove containers and rebuild- Verify container is running:
docker ps - Check firewall isn't blocking port 3000
- Try accessing locally first:
curl http://localhost:3000 - Ensure the Dev Container is fully started (check VSCode terminal for completion)
# SSH into VM
ssh rz169@vcm-48491.vm.duke.edu
# Check Docker service
sudo systemctl status docker
# Reconnect via VSCode Remote SSH and reopen in Dev Container
# The container should start automaticallyFor active development:
- Connect to VM via VSCode Remote SSH
- Open in Dev Container when prompted
- Make changes directly in the Dev Container
- Build changes:
lake build # In the Dev Container terminal - Test changes by refreshing browser at http://vcm-48491.vm.duke.edu:3000/
- Commit and push to Git for backup:
git add . git commit -m "Your changes" git push origin main
For development, ensure you have:
-
Local VSCode:
- "Remote - SSH" extension
- "Dev Containers" extension (optional, for local testing)
-
Remote VSCode (on VM):
- "Dev Containers" extension (will be prompted to install)
- Lean 4 extension (installed automatically in Dev Container)
- VM is temporary: Will be destroyed at semester end
- No backups: You must manage your own backups
- Daily shutdowns: Plan around 6 AM downtime
- Use version control: Always commit and push changes to Git
- Monitor resources: With only 4GB RAM, monitor Docker memory usage
- Port 3000: The game runs on port 3000, not 8080
- Dev Container: Uses VSCode Dev Containers for consistent environment
- VCM Issues: Contact Duke OIT
- Game Issues: Check lean4game documentation
- Docker Issues: Check Dev Container logs in VSCode Output panel
- lean4game Issues: Check lean4game documentation