Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ PORT=8888
# on every request, and start.sh's own readiness/status/smoke checks send it
# automatically. Leave empty for an open (LAN-trusted) server.
API_KEY=
# Docker restart policy for both serving containers. "no" (default) = current
# behavior; "unless-stopped" = containers come back after a host reboot and
# the 2-node rendezvous re-forms (both hosts must reboot cleanly; after a
# single-side crash, prefer rerunning ./start.sh).
RESTART_POLICY=
HOST_BIND=0.0.0.0
DIST_PORT=26400

Expand Down
12 changes: 12 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@
# HF_HOME=~/.cache/huggingface head-side HF cache
# WORKER_HF_HOME=<auto> worker-side HF cache (default $HOME/.cache/…)
# DIST_PORT=26400 2-node rendezvous port on the head
# RESTART_POLICY=no docker restart policy for both containers;
# "unless-stopped" = survive host reboots
# DOWNLOAD_MODE=rsync rsync (head→worker) | direct (worker pulls too)
# MEM_FRACTION_STATIC=0.70 GB10 math: 0.70×122 GB GPU + 26 GB pinned PLE
# + OS ≈ 119 of 122 GB — do not raise past ~0.75
Expand Down Expand Up @@ -240,6 +242,14 @@ API_KEY="${API_KEY:-}"
# treats as failure -- without this, wait_ready times out on a healthy server.
AUTH_CURL=()
[[ -n "${API_KEY}" ]] && AUTH_CURL=(-H "Authorization: Bearer ${API_KEY}")
# Docker restart policy for the two serving containers. Default "no" keeps
# current behavior (a host reboot needs a manual ./start.sh). Set
# RESTART_POLICY=unless-stopped for boot persistence: after a clean reboot of
# BOTH hosts the containers relaunch and the TP rendezvous re-forms on its
# own. Note: on a single-container crash the restarted rank re-enters
# rendezvous against a peer that never died -- if the pair does not recover,
# run ./start.sh (idempotent) to relaunch both sides coherently.
RESTART_POLICY="${RESTART_POLICY:-no}"

# ---- Paths / logs -----------------------------------------------------------
HF_HOME="${HF_HOME:-${HOME}/.cache/huggingface}"
Expand Down Expand Up @@ -994,6 +1004,7 @@ launch() {
info "starting worker (node-rank 1) on ${WORKER_SSH} …"
worker_docker run -d \
--name "${WORKER_CONTAINER}" \
--restart "${RESTART_POLICY}" \
--network host --ipc host --gpus all \
--shm-size 32g \
--device /dev/infiniband --cap-add IPC_LOCK \
Expand Down Expand Up @@ -1021,6 +1032,7 @@ launch() {
info "starting head (node-rank 0, API on ${HOST_BIND}:${PORT}) …"
docker run -d \
--name "${HEAD_CONTAINER}" \
--restart "${RESTART_POLICY}" \
--network host --ipc host --gpus all \
--shm-size 32g \
--device /dev/infiniband --cap-add IPC_LOCK \
Expand Down