From e4c21ad7ac33920272ddf5fc2dc12c10339f661d Mon Sep 17 00:00:00 2001 From: Mrinal Wadhwa Date: Mon, 4 Aug 2025 09:37:36 -0700 Subject: [PATCH 1/3] Fix the devcontainer to work with Github Codespaces --- .devcontainer/Dockerfile | 16 ++++++++++++++++ .devcontainer/devcontainer.json | 9 +++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 .devcontainer/Dockerfile diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..6a24612 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,16 @@ +FROM nixos/nix + +WORKDIR /autonomy +COPY tools/nix ./tools/nix + +RUN echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf \ + && echo "sandbox = relaxed" >> /etc/nix/nix.conf \ + && echo "filter-syscalls = false" >> /etc/nix/nix.conf \ + && nix-channel --update \ + && nix develop ./tools/nix --command echo "Nix environment built and cached" \ + && mkdir -p /root/.local/bin \ + && mkdir -p /root/.cache + +COPY . . + +CMD ["nix", "develop", "./tools/nix", "--command", "bash"] diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 8c0f46d..4581cf2 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,4 +1,9 @@ { - "name": "Autonomy Builder", - "image": "ghcr.io/build-trust/autonomy-builder" + "name": "Builder", + "build": { + "dockerfile": "Dockerfile", + "context": ".." + }, + "workspaceFolder": "/autonomy", + "overrideCommand": false } From 794376bedfafacbc90c4e7b036577f9d43abf2a0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 4 Aug 2025 17:09:18 +0000 Subject: [PATCH 2/3] Initial plan From 92d7746a9cc1645b2cd0c67ce845859ead5407d3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 4 Aug 2025 17:15:31 +0000 Subject: [PATCH 3/3] Add download-buffer-size setting to fix Nix download buffer warning Co-authored-by: mrinalwadhwa <159583+mrinalwadhwa@users.noreply.github.com> --- .devcontainer/Dockerfile | 1 + .github/actions/setup_nix/action.yaml | 1 + tools/docker/dev/Dockerfile | 1 + 3 files changed, 3 insertions(+) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 6a24612..120d55e 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -6,6 +6,7 @@ COPY tools/nix ./tools/nix RUN echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf \ && echo "sandbox = relaxed" >> /etc/nix/nix.conf \ && echo "filter-syscalls = false" >> /etc/nix/nix.conf \ + && echo "download-buffer-size = 268435456" >> /etc/nix/nix.conf \ && nix-channel --update \ && nix develop ./tools/nix --command echo "Nix environment built and cached" \ && mkdir -p /root/.local/bin \ diff --git a/.github/actions/setup_nix/action.yaml b/.github/actions/setup_nix/action.yaml index b83f5f4..3c3fa7e 100644 --- a/.github/actions/setup_nix/action.yaml +++ b/.github/actions/setup_nix/action.yaml @@ -45,6 +45,7 @@ runs: sudo mkdir -p /etc/nix echo "extra-experimental-features = flakes nix-command" > nix.conf + echo "download-buffer-size = 268435456" >> nix.conf sudo mv nix.conf /etc/nix/nix.conf # Restore nix directories from cache diff --git a/tools/docker/dev/Dockerfile b/tools/docker/dev/Dockerfile index 35efe8e..e615d10 100644 --- a/tools/docker/dev/Dockerfile +++ b/tools/docker/dev/Dockerfile @@ -6,6 +6,7 @@ COPY tools/nix ./tools/nix RUN echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf \ && echo "sandbox = relaxed" >> /etc/nix/nix.conf \ && echo "filter-syscalls = false" >> /etc/nix/nix.conf \ + && echo "download-buffer-size = 268435456" >> /etc/nix/nix.conf \ && nix-channel --update \ && nix develop ./tools/nix --command echo "Nix environment built and cached" \ && mkdir -p /root/.local/bin \