Fresh clone to working pipeline in about 10 minutes. Targets Python 3.11+ on Windows (primary — the AIGP sim is Windows-only) or Linux (training proxy only). Read winning-playbook first for why any of this matters.
git clone https://github.com/blakefarabi/grandprix.git
cd grandprix
# venv (Windows)
python -m venv aigp
aigp\Scripts\activate
# venv (Linux / macOS)
python3 -m venv aigp
source aigp/bin/activate
# PyTorch with CUDA 12.8 (RTX 5080 / 40xx / 30xx)
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu128
# APEX dependencies
pip install opencv-python numpy scipy pyyaml ultralytics \
stable-baselines3 gymnasium onnxruntime
Verify GPU visibility:
python -c "import torch; print(torch.cuda.get_device_name(0))"
# → NVIDIA GeForce RTX 5080 (or your card)
python submit_check.py # imports + vision + controller smoke
python test_race_standalone.py # full race against SimDrone proxy
python benchmark_models.py --quick # detector comparison, 1 lap
If you want to verify the training path works, run a smoke version (5 epochs, minutes):
python train_apex.py detector --epochs 5 # ~5 min smoke
python train_apex.py keypoints --epochs 5 # ~4 min smoke
python train_apex.py policy --steps 100000 # ~3 min smoke (not converged)
Full overnight APEX run on RTX 5080 is ~7.5 hr. See local-gpu-training.
| Symptom | Cause | Fix |
|---|---|---|
torch.cuda.is_available() == False | CPU-only Torch installed | Re-install with --index-url https://download.pytorch.org/whl/cu128 |
| CUDA OOM during PPO | Too many parallel envs for 16 GB VRAM | Drop n_envs from 4 → 2 in train_apex_policy |
ModuleNotFoundError: ultralytics | Dep missing | pip install ultralytics |
| submit_check fails on camera | No webcam + cv2.VideoCapture(0) | Already handled; re-run or pass --camera synthetic |
| Windows bash script failure | Old train_all.sh (retired) | Use python train_apex.py — cross-platform |
Full troubleshooting: troubleshooting.
How we actually win. Effort budget, reliability math, data pipeline moat, anti-patterns.
Three-phase training system: detector → keypoints → PPO. Observation-swap flag for VQ2.
Minimum viable run — detector weights in, frame in, command out. Single-file reproduction.
End-to-end pipeline, component file map, sensor budget, commands surface.