From 94acd10988b6f5dcf11842d86b3df72095bb44c8 Mon Sep 17 00:00:00 2001 From: Ryan Angilly Date: Wed, 12 Aug 2026 16:26:53 -0400 Subject: [PATCH 1/2] chore(agent-dev): add GLAMR development container Signed-off-by: Ryan Angilly --- .agent-dev/Dockerfile | 62 ++++++++++++++++++++++++++++++ .agent-dev/Dockerfile.dockerignore | 10 +++++ .agent-dev/README.md | 6 +++ .agent-dev/agent-dev.yaml | 6 +++ 4 files changed, 84 insertions(+) create mode 100644 .agent-dev/Dockerfile create mode 100644 .agent-dev/Dockerfile.dockerignore create mode 100644 .agent-dev/README.md create mode 100644 .agent-dev/agent-dev.yaml diff --git a/.agent-dev/Dockerfile b/.agent-dev/Dockerfile new file mode 100644 index 000000000..a4bca1378 --- /dev/null +++ b/.agent-dev/Dockerfile @@ -0,0 +1,62 @@ +# syntax=docker/dockerfile:1.7 + +FROM --platform=$TARGETPLATFORM rust:1.96.1-bookworm AS rust-toolchain + +FROM --platform=$TARGETPLATFORM python:3.12.13-slim-bookworm + +ARG DEBIAN_FRONTEND=noninteractive +ARG UV_VERSION=0.11.8 + +ENV RUSTUP_HOME=/usr/local/rustup \ + CARGO_HOME=/usr/local/cargo \ + CARGO_TARGET_DIR=/home/sandbox/workspace/target \ + VIRTUAL_ENV=/home/sandbox/workspace/.venv \ + UV_PROJECT_ENVIRONMENT=/home/sandbox/workspace/.venv \ + UV_CACHE_DIR=/opt/switchyard/uv-cache \ + UV_LINK_MODE=copy \ + PATH="/home/sandbox/workspace/.venv/bin:/usr/local/cargo/bin:${PATH}" + +COPY --from=rust-toolchain /usr/local/rustup /usr/local/rustup +COPY --from=rust-toolchain /usr/local/cargo /usr/local/cargo + +RUN apt-get update && apt-get install -y --no-install-recommends \ + bash \ + build-essential \ + ca-certificates \ + cmake \ + curl \ + git \ + iproute2 \ + libssl-dev \ + netcat-openbsd \ + openssh-client \ + pkg-config \ + && rm -rf /var/lib/apt/lists/* \ + && python -m pip install --no-cache-dir "uv==${UV_VERSION}" \ + && rustup component add clippy rustfmt rust-analyzer \ + && cargo --version | grep 'cargo 1.96.1' \ + && uv --version | grep "uv ${UV_VERSION}" + +WORKDIR /home/sandbox/workspace +COPY . . + +RUN git rev-parse --is-inside-work-tree \ + && git remote get-url origin \ + && test -z "$(git status --porcelain)" \ + && cargo fetch --locked \ + && uv sync --locked \ + && cargo fmt --all --check + +RUN useradd -m -s /bin/bash sandbox \ + && mkdir -p /home/sandbox/job /home/sandbox/.cache /sandbox/job /opt/switchyard \ + && chown -R sandbox:sandbox \ + /home/sandbox \ + /sandbox \ + /opt/switchyard \ + /usr/local/cargo \ + /usr/local/rustup + +ENV HOME=/home/sandbox + +USER sandbox +WORKDIR /home/sandbox/workspace diff --git a/.agent-dev/Dockerfile.dockerignore b/.agent-dev/Dockerfile.dockerignore new file mode 100644 index 000000000..1df5ea1dd --- /dev/null +++ b/.agent-dev/Dockerfile.dockerignore @@ -0,0 +1,10 @@ +.venv +target +.mypy_cache +.pytest_cache +.ruff_cache +.worktrees +benchmark/datasets +benchmark/tb_runs +dist +site diff --git a/.agent-dev/README.md b/.agent-dev/README.md new file mode 100644 index 000000000..3983cf0e3 --- /dev/null +++ b/.agent-dev/README.md @@ -0,0 +1,6 @@ +# Agent development container + +This directory enables NVIDIA's internal autonomous coding agent to build a +self-contained Switchyard development environment. GLAMR builds and caches the +Dockerfile from the resolved repository commit; no GitHub Actions image-build +job is required. diff --git a/.agent-dev/agent-dev.yaml b/.agent-dev/agent-dev.yaml new file mode 100644 index 000000000..aea2875db --- /dev/null +++ b/.agent-dev/agent-dev.yaml @@ -0,0 +1,6 @@ +version: 2 +build: + dockerfile: .agent-dev/Dockerfile + context: . +default_execution_environment: repo_dev +preferred_coding_agent: codex From e83f3a25cfa807bb8b75389e7db5db6083d9a747 Mon Sep 17 00:00:00 2001 From: Ryan Angilly Date: Wed, 12 Aug 2026 16:34:33 -0400 Subject: [PATCH 2/2] fix(agent-dev): preserve toolchain path in login shells Signed-off-by: Ryan Angilly --- .agent-dev/Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.agent-dev/Dockerfile b/.agent-dev/Dockerfile index a4bca1378..a970f0cbb 100644 --- a/.agent-dev/Dockerfile +++ b/.agent-dev/Dockerfile @@ -49,6 +49,12 @@ RUN git rev-parse --is-inside-work-tree \ RUN useradd -m -s /bin/bash sandbox \ && mkdir -p /home/sandbox/job /home/sandbox/.cache /sandbox/job /opt/switchyard \ + && printf '%s\n' \ + 'export VIRTUAL_ENV=/home/sandbox/workspace/.venv' \ + 'export UV_PROJECT_ENVIRONMENT=/home/sandbox/workspace/.venv' \ + 'export PATH="/home/sandbox/workspace/.venv/bin:/usr/local/cargo/bin:${PATH}"' \ + > /etc/profile.d/switchyard-agent-dev.sh \ + && chmod 0644 /etc/profile.d/switchyard-agent-dev.sh \ && chown -R sandbox:sandbox \ /home/sandbox \ /sandbox \