Skip to content

Commit a4b943c

Browse files
authored
Merge branch 'main' into aflowers/fingerprint-lockfile
2 parents f66c94c + f6bff83 commit a4b943c

22 files changed

Lines changed: 1200 additions & 62 deletions

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ Thumbs.db
4040
srtslurm.yaml
4141
srtslurm.toml
4242

43+
# Compute-arch uv binary (installed by make setup)
44+
bin/
45+
4346
# Configs - ignore downloaded files but keep deepep_config.json
4447
configs/nats-server
4548
configs/etcd

Makefile

Lines changed: 54 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -45,43 +45,66 @@ setup:
4545
@mkdir -p logs
4646
@echo "🖥️ Using architecture: $(ARCH)"
4747
@case "$(ARCH)" in \
48-
x86_64) ARCH_SHORT="amd64" ;; \
49-
aarch64) ARCH_SHORT="arm64" ;; \
48+
x86_64) ARCH_SHORT="amd64"; ARCH_FILE_PATTERN="x86-64" ;; \
49+
aarch64) ARCH_SHORT="arm64"; ARCH_FILE_PATTERN="aarch64" ;; \
5050
*) echo "❌ Unsupported architecture: $(ARCH)"; exit 1 ;; \
5151
esac; \
52-
echo "ℹ️ Dynamo 0.8.0 will be installed from PyPI when workers start"; \
53-
echo "⬇️ Downloading NATS ($(NATS_VERSION)) for $$ARCH_SHORT..."; \
54-
NATS_DEB="nats-server-$(NATS_VERSION)-$$ARCH_SHORT.deb"; \
55-
NATS_URL="https://github.com/nats-io/nats-server/releases/download/$(NATS_VERSION)/$$NATS_DEB"; \
56-
wget -q --show-progress --tries=3 --waitretry=5 "$$NATS_URL" -O "configs/$$NATS_DEB"; \
57-
echo "📁 Extracting NATS binary..."; \
58-
TMP_DIR=$$(mktemp -d); \
59-
dpkg-deb -x "configs/$$NATS_DEB" "$$TMP_DIR"; \
60-
if [ -f "$$TMP_DIR/usr/local/bin/nats-server" ]; then \
61-
cp "$$TMP_DIR/usr/local/bin/nats-server" configs/; \
62-
elif [ -f "$$TMP_DIR/usr/bin/nats-server" ]; then \
63-
cp "$$TMP_DIR/usr/bin/nats-server" configs/; \
52+
echo ""; \
53+
echo "--- NATS $(NATS_VERSION) ---"; \
54+
if [ -f configs/nats-server ] && file configs/nats-server | grep -q "$$ARCH_FILE_PATTERN"; then \
55+
echo "✅ NATS already installed at configs/nats-server ($(ARCH))"; \
6456
else \
65-
echo "❌ Could not find nats-server binary inside the .deb package"; \
66-
ls -R "$$TMP_DIR" | head -n 50; \
67-
exit 1; \
57+
echo "⬇️ Downloading NATS ($(NATS_VERSION)) for $$ARCH_SHORT..."; \
58+
NATS_DEB="nats-server-$(NATS_VERSION)-$$ARCH_SHORT.deb"; \
59+
NATS_URL="https://github.com/nats-io/nats-server/releases/download/$(NATS_VERSION)/$$NATS_DEB"; \
60+
wget -q --show-progress --tries=3 --waitretry=5 "$$NATS_URL" -O "configs/$$NATS_DEB"; \
61+
echo "📁 Extracting NATS binary..."; \
62+
TMP_DIR=$$(mktemp -d); \
63+
dpkg-deb -x "configs/$$NATS_DEB" "$$TMP_DIR"; \
64+
if [ -f "$$TMP_DIR/usr/local/bin/nats-server" ]; then \
65+
cp "$$TMP_DIR/usr/local/bin/nats-server" configs/; \
66+
elif [ -f "$$TMP_DIR/usr/bin/nats-server" ]; then \
67+
cp "$$TMP_DIR/usr/bin/nats-server" configs/; \
68+
else \
69+
echo "❌ Could not find nats-server binary inside the .deb package"; \
70+
ls -R "$$TMP_DIR" | head -n 50; \
71+
exit 1; \
72+
fi; \
73+
chmod +x configs/nats-server; \
74+
rm -rf "$$TMP_DIR" "configs/$$NATS_DEB"; \
75+
echo "✅ NATS installed to configs/nats-server"; \
76+
fi; \
77+
echo ""; \
78+
echo "--- ETCD $(ETCD_VERSION) ---"; \
79+
if [ -f configs/etcd ] && [ -f configs/etcdctl ] && file configs/etcd | grep -q "$$ARCH_FILE_PATTERN"; then \
80+
echo "✅ ETCD already installed at configs/etcd ($(ARCH))"; \
81+
else \
82+
echo "⬇️ Downloading ETCD ($(ETCD_VERSION)) for $$ARCH_SHORT..."; \
83+
ETCD_TAR="etcd-$(ETCD_VERSION)-linux-$$ARCH_SHORT.tar.gz"; \
84+
ETCD_URL="https://github.com/etcd-io/etcd/releases/download/$(ETCD_VERSION)/$$ETCD_TAR"; \
85+
wget -q --show-progress --tries=3 --waitretry=5 "$$ETCD_URL" -O "configs/$$ETCD_TAR"; \
86+
echo "📁 Extracting ETCD binaries..."; \
87+
tar -xzf "configs/$$ETCD_TAR" --strip-components=1 -C configs etcd-$(ETCD_VERSION)-linux-$$ARCH_SHORT/etcd etcd-$(ETCD_VERSION)-linux-$$ARCH_SHORT/etcdctl; \
88+
chmod +x configs/etcd configs/etcdctl; \
89+
rm "configs/$$ETCD_TAR"; \
90+
echo "✅ ETCD installed to configs/etcd"; \
91+
fi; \
92+
echo ""; \
93+
echo "--- uv (compute node arch: $(ARCH)) ---"; \
94+
if [ -f bin/uv ] && file bin/uv | grep -q "$$ARCH_FILE_PATTERN"; then \
95+
echo "✅ uv already installed at bin/uv ($(ARCH))"; \
96+
else \
97+
echo "⬇️ Downloading uv for $(ARCH)..."; \
98+
mkdir -p bin; \
99+
UV_URL="https://github.com/astral-sh/uv/releases/latest/download/uv-$(ARCH)-unknown-linux-gnu.tar.gz"; \
100+
curl -LsSf "$$UV_URL" | tar -xz --strip-components=1 -C bin; \
101+
chmod +x bin/uv bin/uvx 2>/dev/null; \
102+
echo "✅ uv installed to bin/uv ($$(file bin/uv | grep -o 'ARM aarch64\|x86-64'))"; \
68103
fi; \
69-
chmod +x configs/nats-server; \
70-
rm -rf "$$TMP_DIR" "configs/$$NATS_DEB"; \
71-
echo "⬇️ Downloading ETCD ($(ETCD_VERSION)) for $$ARCH_SHORT..."; \
72-
ETCD_TAR="etcd-$(ETCD_VERSION)-linux-$$ARCH_SHORT.tar.gz"; \
73-
ETCD_URL="https://github.com/etcd-io/etcd/releases/download/$(ETCD_VERSION)/$$ETCD_TAR"; \
74-
wget -q --show-progress --tries=3 --waitretry=5 "$$ETCD_URL" -O "configs/$$ETCD_TAR"; \
75-
echo "📁 Extracting ETCD binaries..."; \
76-
tar -xzf "configs/$$ETCD_TAR" --strip-components=1 -C configs etcd-$(ETCD_VERSION)-linux-$$ARCH_SHORT/etcd etcd-$(ETCD_VERSION)-linux-$$ARCH_SHORT/etcdctl; \
77-
chmod +x configs/etcd configs/etcdctl; \
78-
rm "configs/$$ETCD_TAR"; \
79-
echo "✅ Done. Contents of configs directory:"; \
80-
ls -lh configs/; \
81104
echo ""; \
82-
echo "⚙️ Setting up srtslurm.yaml..."; \
105+
echo "--- srtslurm.yaml ---"; \
83106
if [ -f srtslurm.yaml ]; then \
84-
echo "ℹ️ srtslurm.yaml already exists, skipping..."; \
107+
echo "srtslurm.yaml already exists"; \
85108
else \
86109
echo "Creating srtslurm.yaml with your cluster settings..."; \
87110
echo ""; \

recipes/mocker/agg.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Mocker smoke test - Aggregated mode
2+
# Validates full srt-slurm pipeline (SLURM, container, mounts, tokenizer,
3+
# discovery, frontend, benchmark) without loading model weights.
4+
#
5+
# Usage:
6+
# srtctl apply -f recipes/mocker/agg.yaml
7+
# srtctl dry-run -f recipes/mocker/agg.yaml
8+
9+
name: "smoke-test-agg"
10+
11+
slurm:
12+
time_limit: "00:15:00"
13+
14+
model:
15+
path: "hf:Qwen/Qwen3-0.6B"
16+
container: "dynamo-sglang"
17+
precision: "fp16"
18+
19+
resources:
20+
gpu_type: "gb200"
21+
gpus_per_node: 4
22+
agg_nodes: 1
23+
agg_workers: 1
24+
25+
frontend:
26+
type: dynamo
27+
enable_multiple_frontends: false
28+
29+
backend:
30+
type: mocker
31+
speedup_ratio: 100
32+
engine_type: vllm
33+
34+
benchmark:
35+
type: "sa-bench"
36+
isl: 128
37+
osl: 128
38+
concurrencies: "4"

src/srtctl/backends/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@
1010
"""
1111

1212
from .base import BackendProtocol, BackendType, SrunConfig
13+
from .mocker import MockerProtocol, MockerServerConfig
1314
from .sglang import SGLangProtocol, SGLangServerConfig
1415
from .trtllm import TRTLLMProtocol, TRTLLMServerConfig
1516
from .vllm import VLLMProtocol, VLLMServerConfig
1617

1718
# Union type for all backend configs
18-
BackendConfig = SGLangProtocol | TRTLLMProtocol | VLLMProtocol
19+
BackendConfig = SGLangProtocol | TRTLLMProtocol | VLLMProtocol | MockerProtocol
1920

2021
__all__ = [
2122
# Base types
@@ -32,4 +33,7 @@
3233
# vLLM
3334
"VLLMProtocol",
3435
"VLLMServerConfig",
36+
# Mocker
37+
"MockerProtocol",
38+
"MockerServerConfig",
3539
]

src/srtctl/backends/base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ class BackendType(str, Enum):
2222

2323
SGLANG = "sglang"
2424
TRTLLM = "trtllm"
25+
VLLM = "vllm"
26+
MOCKER = "mocker"
2527

2628

2729
@dataclass

0 commit comments

Comments
 (0)