Skip to content

Commit a6155f9

Browse files
authored
chore: remove unnecessary cache config (NVIDIA#54)
1 parent 0b713f7 commit a6155f9

6 files changed

Lines changed: 3 additions & 25 deletions

File tree

.github/workflows/ci-image.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ jobs:
3939
run: |
4040
docker buildx build \
4141
--platform linux/amd64,linux/arm64 \
42-
--cache-from type=registry,ref=${{ env.CI_IMAGE }}:buildcache \
43-
--cache-to type=registry,ref=${{ env.CI_IMAGE }}:buildcache,mode=max \
4442
--build-arg MISE_GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} \
4543
--push \
4644
-t ${{ env.CI_IMAGE }}:${{ github.sha }} \

.github/workflows/docker-build.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ on:
2020

2121
env:
2222
MISE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23-
GHCR_CACHE: ghcr.io/nvidia/nv-agent-env/cache
2423

2524
permissions:
2625
contents: read
@@ -55,6 +54,4 @@ jobs:
5554
- name: Build ${{ inputs.component }} image
5655
env:
5756
DOCKER_BUILDER: navigator
58-
DOCKER_CACHE_FROM: "type=registry,ref=${{ env.GHCR_CACHE }}/${{ inputs.component }}:buildcache"
59-
DOCKER_CACHE_TO: "type=registry,ref=${{ env.GHCR_CACHE }}/${{ inputs.component }}:buildcache,mode=max"
6057
run: mise run --no-prepare docker:build:${{ inputs.component }}

architecture/build-containers.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,10 +393,9 @@ Container builds use Docker BuildKit with local cache directories:
393393

394394
In CI pipelines:
395395

396-
- `.cache/buildkit/` is cached between pipeline runs to avoid recompiling unchanged Rust dependencies.
396+
- Remote BuildKit daemons (`buildkit-amd64` and `buildkit-arm64`) are used as persistent builders via `driver: remote`. Their built-in layer cache persists across builds, so no external cache (registry-backed or otherwise) is needed in CI.
397397
- Rust lint/test jobs cache `.cache/sccache/` and `target/` with keys derived from `Cargo.lock` and Rust task config files, scoped per runner architecture.
398398
- CI sets `CARGO_INCREMENTAL=0` to favor deterministic clean builds over incremental metadata churn.
399-
- The `build_ci_image` job publishes a registry-backed BuildKit cache at `$CI_REGISTRY_IMAGE/ci:buildcache` so layer cache survives across runners and pipelines even when local cache directories are cold.
400399
- Publish jobs mirror `crazymax/osxcross:latest` into `$CI_REGISTRY_IMAGE/third_party/osxcross:latest` (when missing) and set `OSXCROSS_IMAGE` so macOS wheel Docker builds consume the mirrored image instead of pulling from Docker Hub on each run.
401400
- The sandbox e2e test job tags and pushes component images to the GitLab project registry (`$CI_REGISTRY_IMAGE`) and configures cluster bootstrap to pull from that remote registry with CI credentials.
402401

build/scripts/docker-build-cluster.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
# DOCKER_PLATFORM - Target platform (optional)
99
# DOCKER_BUILDER - Buildx builder name (default: auto-select)
10-
# DOCKER_CACHE_FROM - Explicit --cache-from value (e.g. type=registry,ref=...)
11-
# DOCKER_CACHE_TO - Explicit --cache-to value (e.g. type=registry,ref=...,mode=max)
1210
# DOCKER_PUSH - When set to "1", push instead of loading into local daemon
1311
# IMAGE_REGISTRY - Registry prefix for image name (e.g. ghcr.io/org/repo)
1412
set -euo pipefail
@@ -34,11 +32,7 @@ elif [[ -z "${DOCKER_PLATFORM:-}" && -z "${CI:-}" ]]; then
3432
fi
3533

3634
CACHE_ARGS=()
37-
if [[ -n "${DOCKER_CACHE_FROM:-}" || -n "${DOCKER_CACHE_TO:-}" ]]; then
38-
# Explicit cache configuration from the caller (e.g. CI registry cache).
39-
[[ -n "${DOCKER_CACHE_FROM:-}" ]] && CACHE_ARGS+=(--cache-from "${DOCKER_CACHE_FROM}")
40-
[[ -n "${DOCKER_CACHE_TO:-}" ]] && CACHE_ARGS+=(--cache-to "${DOCKER_CACHE_TO}")
41-
elif [[ -z "${CI:-}" ]]; then
35+
if [[ -z "${CI:-}" ]]; then
4236
# Local development: use filesystem cache with docker-container driver.
4337
if docker buildx inspect ${BUILDER_ARGS[@]+"${BUILDER_ARGS[@]}"} 2>/dev/null | grep -q "Driver: docker-container"; then
4438
CACHE_ARGS=(

build/scripts/docker-build-component.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
# IMAGE_TAG - Image tag (default: dev)
1515
# DOCKER_PLATFORM - Target platform (optional, e.g. linux/amd64)
1616
# DOCKER_BUILDER - Buildx builder name (default: auto-select)
17-
# DOCKER_CACHE_FROM - Explicit --cache-from value (e.g. type=registry,ref=...)
18-
# DOCKER_CACHE_TO - Explicit --cache-to value (e.g. type=registry,ref=...,mode=max)
1917
# DOCKER_PUSH - When set to "1", push instead of loading into local daemon
2018
# IMAGE_REGISTRY - Registry prefix for image name (e.g. ghcr.io/org/repo)
2119
set -euo pipefail
@@ -80,11 +78,7 @@ elif [[ -z "${DOCKER_PLATFORM:-}" && -z "${CI:-}" ]]; then
8078
fi
8179

8280
CACHE_ARGS=()
83-
if [[ -n "${DOCKER_CACHE_FROM:-}" || -n "${DOCKER_CACHE_TO:-}" ]]; then
84-
# Explicit cache configuration from the caller (e.g. CI registry cache).
85-
[[ -n "${DOCKER_CACHE_FROM:-}" ]] && CACHE_ARGS+=(--cache-from "${DOCKER_CACHE_FROM}")
86-
[[ -n "${DOCKER_CACHE_TO:-}" ]] && CACHE_ARGS+=(--cache-to "${DOCKER_CACHE_TO}")
87-
elif [[ -z "${CI:-}" ]]; then
81+
if [[ -z "${CI:-}" ]]; then
8882
# Local development: use filesystem cache with docker-container driver.
8983
if docker buildx inspect ${BUILDER_ARGS[@]+"${BUILDER_ARGS[@]}"} 2>/dev/null | grep -q "Driver: docker-container"; then
9084
CACHE_ARGS=(

build/scripts/docker-publish-multiarch.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,6 @@ for component in sandbox server; do
129129
--platform "${PLATFORMS}" \
130130
-f "${DOCKERFILE}" \
131131
-t "${FULL_IMAGE}:${IMAGE_TAG}" \
132-
--cache-from "type=registry,ref=${FULL_IMAGE}:buildcache" \
133-
--cache-to "type=registry,ref=${FULL_IMAGE}:buildcache,mode=max" \
134132
${EXTRA_BUILD_FLAGS} \
135133
${BUILD_ARGS} \
136134
--push \
@@ -157,8 +155,6 @@ docker buildx build \
157155
-f deploy/docker/Dockerfile.cluster \
158156
-t "${CLUSTER_IMAGE}:${IMAGE_TAG}" \
159157
--build-arg K3S_VERSION=${K3S_VERSION} \
160-
--cache-from "type=registry,ref=${CLUSTER_IMAGE}:buildcache" \
161-
--cache-to "type=registry,ref=${CLUSTER_IMAGE}:buildcache,mode=max" \
162158
${EXTRA_BUILD_FLAGS} \
163159
--push \
164160
.

0 commit comments

Comments
 (0)