You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: architecture/build-containers.md
+11-3Lines changed: 11 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -121,8 +121,8 @@ A k3s image with bundled Helm charts and Kubernetes manifests for single-contain
121
121
122
122
Two Dockerfiles produce Python wheels for the CLI package distribution. These are not deployed as running containers.
123
123
124
-
-**`Dockerfile.python-wheels`** -- Builds Linux amd64/arm64 wheels using Maturin. Installs Rust toolchain and cross-compilation targets. Output stage is `scratch` with only the `.whl` files.
125
-
-**`Dockerfile.python-wheels-macos`** -- Builds macOS arm64 wheels using osxcross (cross-compiling from Linux). Uses `crazymax/osxcross:latest` as the cross-toolchain source. The `OSXCROSS_IMAGE` build arg allows using a mirrored registry image instead of Docker Hub.
124
+
-**`Dockerfile.python-wheels`** -- Builds Linux amd64/arm64 wheels using Maturin with a two-pass Rust build (dependency prebuild + final wheel build), BuildKit cache mounts for cargo registry/git/target and sccache, and `cross-build.sh` for conditional cross-toolchain installation. The final build step patches workspace version inside the container layer from `NAVIGATOR_CARGO_VERSION` (computed before Docker build), preserving cacheable dependency layers and avoiding dirty working-tree edits. Output stage is `scratch` with only the `.whl` files.
125
+
-**`Dockerfile.python-wheels-macos`** -- Builds macOS arm64 wheels using osxcross (cross-compiling from Linux) with the same two-pass dependency caching pattern and cargo cache mounts. Version injection uses the same in-container workspace-version patch from `NAVIGATOR_CARGO_VERSION`, avoiding host-side file edits that break Docker layer caching. Uses `crazymax/osxcross:latest` as the cross-toolchain source. The `OSXCROSS_IMAGE` build arg allows using a mirrored registry image instead of Docker Hub.
126
126
127
127
### CI Runner Image (`navigator-ci`)
128
128
@@ -135,7 +135,7 @@ A pre-built Ubuntu 24.04 image for CI pipeline jobs, defined in `deploy/docker/D
@@ -385,6 +385,7 @@ Container builds use Docker BuildKit with local cache directories:
385
385
386
386
- `build/scripts/docker-build-component.sh`stores per-component caches in `.cache/buildkit/<component>`.
387
387
- `build/scripts/docker-build-cluster.sh`stores the cluster image cache in `.cache/buildkit/cluster`.
388
+
- `mise run python:build:multiarch`stores per-platform wheel caches in `.cache/buildkit/python-wheels/<platform>` for local builds when using a `docker-container` buildx driver.
388
389
- Rust-heavy Dockerfiles use BuildKit cache mounts for cargo registry and target directories, keyed by image name and `TARGETARCH`, with `sharing=locked` to prevent concurrent cache corruption in parallel CI builds.
389
390
- When the active buildx driver is `docker` (not `docker-container`), local cache import/export flags are skipped automatically because the docker driver cannot export local caches. In CI, cache export is also skipped.
390
391
- For local single-arch builds, the scripts auto-select a builder with the native `docker` driver (matching the active Docker context) so images land directly in the Docker image store without slow tarball export.
@@ -450,6 +451,13 @@ mise run docker:publish:cluster:multiarch
450
451
mise run publish:main
451
452
```
452
453
454
+
GitHub Actions stages Python wheels in S3 before final publication to
455
+
Artifactory:
456
+
457
+
- Wheels are uploaded to `s3://navigator-pypi-artifacts/navigator/<wheel-version>/`.
458
+
- A follow-up job on the `nv` runner lists that version prefix, downloads the
459
+
wheels, and publishes them to Artifactory.
460
+
453
461
### Auto-Deployed Components in Cluster
454
462
455
463
When the cluster container starts, k3s automatically deploys these HelmChart CRs from `/var/lib/rancher/k3s/server/manifests/`:
0 commit comments