Deploy code via S3¶
With SSH set up, use make push-hosts
If you can reach the hosts with ssh
(SSH over Session Manager),
make push-hosts copies the code to every host in one step, without the
bucket (Make targets). This page is for
when SSH isn't set up, and for deploy/client/run-on-hosts.sh, which
always syncs the hosts from the bucket.
The hosts have no inbound access, so code moves through the bench bucket.
The instance role can read and write it. The bucket is in region
(us-east-1 by default), so the S3 gateway endpoint keeps traffic off the NAT
gateway for hosts in that region. Hosts in other regions (trn2 and g7e by
default) reach the bucket through their NAT gateways.
From your workstation¶
From the repository root, with AWS_PROFILE and BUCKET set
(Environment):
aws s3 sync . "s3://$BUCKET/src/" --delete \
--exclude ".git/*" --exclude ".idea/*" --exclude ".venv/*" \
--exclude ".serena/*" --exclude ".claude/*" --exclude "*.DS_Store" \
--exclude "terraform/*" --exclude "site/*" --exclude "dist/*" --exclude "targets.toml" \
--exclude ".pytest_cache/*" --exclude ".ruff_cache/*" --exclude "*__pycache__*"
--delete removes bucket files that no longer exist locally. The root
targets.toml stays local, but deploy/client/targets.toml is uploaded,
because on-host runs need it (Configuration).
On each host¶
BUCKET=<bucket name>; BUCKET_REGION=<bucket region> # terraform output bucket_name / bucket_region
aws s3 sync "s3://$BUCKET/src/" ~/snap-asr-bench/ --region "$BUCKET_REGION" --delete --exclude "targets.toml"
chmod +x ~/snap-asr-bench/deploy/*/*.sh ~/snap-asr-bench/sidecar/*.py
S3 doesn't keep file modes, so chmod restores the executable bits. Then:
- Bench:
cd ~/snap-asr-bench && make sync UV_NO_DEV=1(oruv sync --no-dev). - Inference hosts: for changes to vLLM or sidecar files, reinstall with
make install-nvidia NVIDIA_HOST=g4dn|g7e|g6ormake install-trn2(or the steps on the NVIDIA, trn2 and sidecar pages), thensudo systemctl restart vllm asr-log-sidecar(a trn2 restart takes about 10 minutes). Reinstalling copies the env files from the repository, plus any*.local.envoverrides, so it undoes hand edits in/etc/snap-asr-bench/such as a model switch.
For client-only changes, on-host runs don't need this step:
run-on-hosts.sh syncs each host and rebuilds its client image itself. It
doesn't reinstall or restart vLLM or the sidecar.
Upload benchmark inputs¶
Keep the inputs in one local directory and sync the whole directory:
aws s3 sync ./inputs/ "s3://$BUCKET/inputs/"
sync only uploads files that are new or have changed (by size and
modification time), so it's cheap to re-run after adding a file. Pass the
keys to the client as s3://$BUCKET/inputs/<file>. Subdirectories keep
their paths, for example s3://$BUCKET/inputs/dataset-a/clip-01.mp4.
Don't add --delete here. Other people's inputs share this prefix, and
--delete would remove any that aren't in your local directory. To see
what's already there, run aws s3 ls "s3://$BUCKET/inputs/" --recursive.
Each host caches an input on its instance store and downloads it again only when its ETag changes, so re-uploading a changed file is enough.
For a manifest run, upload the
manifest CSV and any reference transcripts the same way, for example under
inputs/<set>/ next to the clips. Relative paths in a manifest are
resolved against its own S3 prefix, so a manifest that names clips/a.mp4
and refs/a.txt works as long as those keys sit beside it.