Developer tools¶
What to install on the workstation you develop and deploy from. The hosts have their own requirements, covered on their installation pages.
Tools¶
| Tool | Version | Used for | Install (macOS / Linux) |
|---|---|---|---|
| GNU Make | 3.81 or later | Every make target |
Included with macOS (/usr/bin/make is GNU Make 3.81). Linux: make package. BSD make isn't supported. |
| Git | Any recent | Client image tags (git describe) |
Xcode Command Line Tools, or the git package |
| uv | Tested with 0.12 | Python, dependencies, tests, docs, ruff | brew install uv, or the installer |
| Python | 3.12 | The client, tests and docs | Installed by uv from .python-version on first use. No separate install needed. |
| ffmpeg and ffprobe | Any recent | Running the client locally. The media tests, which are skipped without them. | brew install ffmpeg, or the ffmpeg package |
| Terraform | 1.6 or later | Infrastructure, make lint-tf, and reading outputs in the runbooks |
brew install terraform (HashiCorp tap), or HashiCorp's packages |
| TFLint | Tested with 0.66 | make lint-tf |
See Install TFLint |
| Docker | With BuildKit (Docker 23 or later) | Image targets. Building on Apple Silicon for linux/amd64 needs emulation, which Docker Desktop includes. |
Docker Desktop, or Docker Engine |
| AWS CLI | v2 | Terraform credentials, S3 sync, ECR login, SSM | brew install awscli, or the installer |
| Session Manager plugin | Any recent | aws ssm start-session to the hosts |
AWS's installer |
| jq | 1.6 or later | deploy/client/run-on-hosts.sh and several runbook commands |
brew install jq, or the jq package |
| Bash | 3.2 or later | The scripts under deploy/ |
Included with macOS and Linux |
| Claude Code | Any recent. Optional. | The /snap-bench skill (Run benchmarks with Claude Code). It needs an account with Anthropic, or access to Claude through a cloud provider such as Amazon Bedrock. |
Anthropic's documentation |
Install TFLint¶
make lint-tf needs TFLint on your PATH. Without it, the target stops
with a pointer to this section.
macOS (Homebrew). Install from the TFLint project's own tap:
brew install --cask terraform-linters/tap/tflint
A plain brew install tflint may report No available formula with the name
"tflint", depending on your Homebrew setup. The tap above works either way.
Linux, or without Homebrew. Download the release for your platform from
TFLint's releases,
check it against the published checksums, and put it on your PATH. For
example, for Linux on x86-64 (use tflint_darwin_arm64.zip on an Apple
Silicon Mac):
cd "$(mktemp -d)" && curl -fsSLO https://github.com/terraform-linters/tflint/releases/download/v0.66.0/tflint_linux_amd64.zip && curl -fsSLO https://github.com/terraform-linters/tflint/releases/download/v0.66.0/checksums.txt
grep ' tflint_linux_amd64.zip$' checksums.txt | sha256sum -c -
Continue only if that prints tflint_linux_amd64.zip: OK. On macOS use
shasum -a 256 -c - instead of sha256sum -c -.
mkdir -p ~/.local/bin && unzip -o tflint_linux_amd64.zip -d ~/.local/bin
Make sure ~/.local/bin is on your PATH.
Check it. From the repository root:
tflint --version && make lint-tf
make lint-tf runs tflint --init itself. The rules come from TFLint's
bundled Terraform ruleset (terraform/.tflint.hcl), so there's no plugin to
download. The target doesn't need AWS credentials: terraform init runs
with -backend=false, and validate doesn't contact AWS.
Terraform providers¶
The Terraform providers (hashicorp/aws 6.x and hashicorp/random 3.x)
are downloaded by terraform init. make lint-tf runs it with
-backend=false, so it doesn't touch the state.
What each make target needs¶
Every target needs GNU Make. The install-* targets run on the hosts, not
the workstation; see each host's installation page.
| Target | Needs |
|---|---|
help |
Make only |
sync, test |
uv. test uses ffmpeg if present. |
bench |
uv, ffmpeg and ffprobe, and AWS credentials for S3 inputs, manifests, references or --results-s3 |
push-hosts |
OpenSSH and tar, with an SSH config entry per host that connects without prompts (SSH over Session Manager); uv, to read the targets file when HOSTS isn't set; Git for a Git checkout |
score |
uv |
sync-manifest |
Python 3 and the AWS CLI with read access to the manifest's buckets |
docs, docs-build |
uv |
lint |
Everything lint-py and lint-tf need |
lint-py, lint-fix, format |
uv (ruff runs through uvx). format also needs Terraform. |
lint-tf |
Terraform and TFLint |
clean |
Make only |
image-trn2, image-client |
Docker. image-client also needs Git. |
ecr-login |
AWS CLI and Docker |
image-push-trn2, image-push-client |
Docker, AWS CLI with ECR push permissions, and Git for image-push-client |
install-bench |
On the bench host: sudo and uv |
install-nvidia, install-vllm-nvidia, install-sidecar-nvidia |
On g4dn, g7e or g6: sudo, systemd and Docker with the NVIDIA runtime |
install-trn2, install-vllm-trn2, install-sidecar-trn2 |
On trn2: sudo, systemd, Docker, the Neuron driver, and the AWS CLI for the ECR login |
Credentials¶
Terraform, the AWS CLI and the client use the standard AWS credential chain:
AWS_PROFILE, environment variables, SSO or an instance role. To pin
Terraform to a profile, set aws_profile in terraform/terraform.tfvars
(see terraform/terraform.tfvars.example). Nothing in the repository holds
credentials.
Check your setup¶
make --version | head -1; git --version; uv --version; ffmpeg -version | head -1; terraform version | head -1; tflint --version | head -1; docker version --format '{{.Client.Version}}'; aws --version; session-manager-plugin --version; jq --version
Then run make lint test docs-build from the repository root.
Writing the docs¶
Preview¶
Serve the site with live reload, then open http://127.0.0.1:8000/:
make docs
If port 8000 is taken, pick another, for example on an inference host, where vLLM listens on 8000:
make docs DOCS_PORT=8080
DOCS_HOST=0.0.0.0 makes the site reachable from other machines on your
network. The default, 127.0.0.1, keeps it on this machine, which is all
an SSH or SSM port forward needs. Before committing, run make docs-build,
which fails on any warning.
Capitalisation¶
Section labels use sentence case. This covers page titles, headings,
nav entries in mkdocs.yml and admonition titles:
- Capitalise the first word, and proper nouns and acronyms only. Write "Run on the inference hosts", not "Run On The Inference Hosts".
- Keep names as their owners write them. vLLM, NVIDIA, Trainium, Hugging Face, Docker, Terraform, TFLint, uv, GitHub, and the product name, Snap ASR Bench.
- Keep acronyms in capitals. AWS, S3, ECR, SSM, HTTP, JSONL, CLI.
- Keep instance types, hosts and code as written, and put code in
backticks: trn2, g4dn.xlarge,
make docs.
make docs-build builds with --strict, and anchor checks are on, so a
broken link, or a renamed heading that's still linked, fails the build.