-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
99 lines (82 loc) · 3.32 KB
/
Makefile
File metadata and controls
99 lines (82 loc) · 3.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Reachy Mini MuJoCo Simulation - Docker Management
# Convenient commands for building and running Docker containers
.PHONY: help docker-build-vnc docker-build-headless docker-run-vnc docker-run-vnc-detached docker-run-headless docker-stop docker-clean docker-logs docker-test
# Default target
.DEFAULT_GOAL := help
help: ## Show this help message
@echo "Reachy Mini Docker Commands:"
@echo ""
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-25s\033[0m %s\n", $$1, $$2}'
@echo ""
@echo "Quick start:"
@echo " make docker-build-vnc # Build VNC image (first time)"
@echo " make docker-run-vnc # Run with 3D viewer"
@echo ""
docker-build-vnc: ## Build VNC-enabled Docker image
@echo "🔨 Building VNC Docker image..."
docker-compose --profile vnc build
@echo "✅ Build complete! Run 'make docker-run-vnc' to start."
docker-build-headless: ## Build headless Docker image (no 3D viewer)
@echo "🔨 Building headless Docker image..."
docker-compose --profile headless build
@echo "✅ Build complete! Run 'make docker-run-headless' to start."
docker-run-vnc: ## Run VNC simulation (foreground with logs)
@echo "🚀 Starting Reachy Mini with VNC..."
@echo ""
@echo "Access points:"
@echo " 🌐 3D Viewer: http://localhost:6080"
@echo " 🎛️ Dashboard: http://localhost:8000"
@echo ""
docker-compose --profile vnc up
docker-run-vnc-detached: ## Run VNC simulation in background
@echo "🚀 Starting Reachy Mini with VNC (background)..."
docker-compose --profile vnc up -d
@echo ""
@echo "✅ Simulation running in background!"
@echo ""
@echo "Access points:"
@echo " 🌐 3D Viewer: http://localhost:6080"
@echo " 🎛️ Dashboard: http://localhost:8000"
@echo ""
@echo "View logs with: make docker-logs"
@echo "Stop with: make docker-stop"
docker-run-headless: ## Run headless simulation (no 3D viewer)
@echo "🚀 Starting Reachy Mini (headless mode)..."
@echo ""
@echo "Access points:"
@echo " 🎛️ Dashboard: http://localhost:8000"
@echo " 📚 API Docs: http://localhost:8000/docs"
@echo ""
docker-compose --profile headless up
docker-stop: ## Stop all running containers
@echo "🛑 Stopping Reachy Mini containers..."
docker-compose down
@echo "✅ Stopped."
docker-clean: ## Stop containers and remove images
@echo "🧹 Cleaning up Docker resources..."
docker-compose down -v --rmi all
@echo "✅ Cleanup complete."
docker-logs: ## View container logs
docker-compose logs -f
docker-test: ## Test if simulation is responding
@echo "🧪 Testing simulation health..."
@curl -s http://localhost:8000/api/state/full > /dev/null && \
echo "✅ Simulation is running and responding!" || \
echo "❌ Simulation not responding. Is it running?"
docker-shell: ## Open shell in running VNC container
docker exec -it reachy-mini-vnc /bin/bash
docker-rebuild: ## Rebuild and restart VNC container
@echo "🔄 Rebuilding and restarting..."
docker-compose --profile vnc up --build
# Git LFS shortcuts
git-lfs-install: ## Install Git LFS hooks
git lfs install
git-lfs-pull: ## Pull Git LFS files (model assets)
git lfs pull
# Full setup from scratch
setup: git-lfs-install git-lfs-pull docker-build-vnc ## Complete first-time setup
@echo ""
@echo "✨ Setup complete!"
@echo ""
@echo "Run 'make docker-run-vnc' to start the simulation."
@echo ""