-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (45 loc) · 1.96 KB
/
Makefile
File metadata and controls
58 lines (45 loc) · 1.96 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
COMPOSE = docker compose -f docker/docker-compose.yml --env-file .env
help:
@echo "Usage: make <target>"
@echo ""
@echo " sync Update local uv environment"
@echo " up Build and start all services"
@echo " down Stop all services"
@echo " restart Stop and restart all services"
@echo " ps Show service status"
@echo " logs Show logs (optional: s=<service>)"
@echo " setup-gateway Bootstrap this machine as gateway node"
@echo " setup-node Bootstrap this machine as compute node"
@echo " config Regenerate LiteLLM config from node-assignments.yaml"
@echo " check Verify gateway setup and service health"
@echo " check-docker Test Docker network connectivity to PyPI"
sync:
uv sync --upgrade
up: sync
$(COMPOSE) up -d --build
down:
$(COMPOSE) down
restart: sync
$(COMPOSE) down && $(COMPOSE) up -d --build
ps:
$(COMPOSE) ps
logs:
$(COMPOSE) logs --tail=50 $(s)
setup-gateway:
zsh scripts/setup-node.sh gateway
setup-node:
zsh scripts/setup-node.sh node
config:
uv run thunder-forge generate-config
check:
zsh scripts/setup-node.sh gateway --check
check-docker:
@echo "==> Proxy config inside container..."
@docker run --rm python:3.12-slim env | grep -iE '^(https?_proxy|no_proxy)=' || echo " (none — if behind a proxy, configure ~/.docker/config.json proxies)"
@echo "==> Testing DNS resolution..."
@docker run --rm python:3.12-slim python -c "import socket; ip = socket.getaddrinfo('pypi.org', 443)[0][4][0]; print(f' pypi.org -> {ip}')" || echo " FAIL: DNS resolution failed"
@echo "==> Testing HTTPS connectivity to PyPI (timeout 30s)..."
@docker run --rm python:3.12-slim pip install --dry-run --timeout 30 hatchling 2>&1 | tail -5
@echo "==> Done. If DNS or HTTPS failed, check Docker DNS config (daemon.json) or firewall/VPN settings."
.PHONY: help sync up down restart ps logs config setup-gateway setup-node check check-docker
.DEFAULT_GOAL := help