-
Notifications
You must be signed in to change notification settings - Fork 678
refactor(docker): split gateway/supervisor Dockerfiles and use native rust builds #1316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
359efbc
wip
drew 4941fa9
refactor(docker): use native rust builds for split gateway/supervisor…
TaylorMutch bbc46d3
refactor(docker): tighten binary perms via --chown + 0550
TaylorMutch 506473d
ci(gpu): repoint GPU probe image lookup at Dockerfile.gateway
TaylorMutch 1a7b7de
ci(gpu): pin GPU probe to nvcr.io/nvidia/base/ubuntu:noble
TaylorMutch e164a7e
fix(e2e-gpu): pass GPU probe image via env, drop Dockerfile.images parse
TaylorMutch d4fdfb1
fix(docker): keep supervisor binary root-owned for rootless Podman
TaylorMutch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # syntax=docker/dockerfile:1.4 | ||
|
|
||
| # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # Gateway image build. | ||
| # | ||
| # The Rust binary is built natively before this image build runs and staged at: | ||
| # deploy/docker/.build/prebuilt-binaries/<arch>/openshell-gateway | ||
| # | ||
| # Use tasks/scripts/docker-build-image.sh gateway (or `mise run build:docker:gateway`) | ||
| # to stage the binary and build the image in one step. CI builds the binary | ||
| # per-architecture via the `rust-native-build.yml` workflow and uploads it as | ||
| # an artifact, which is downloaded into the same staging directory before the | ||
| # image build job runs. | ||
| # | ||
| # The runtime is `nvcr.io/nvidia/distroless/cc:4.0.0`, which provides glibc and | ||
| # the dynamic loader needed by the GNU-linked gateway binary while keeping the | ||
| # attack surface small. | ||
|
|
||
| ARG GATEWAY_BASE_IMAGE=nvcr.io/nvidia/distroless/cc:v4.0.4 | ||
|
TaylorMutch marked this conversation as resolved.
|
||
|
|
||
| FROM ${GATEWAY_BASE_IMAGE} AS gateway | ||
|
|
||
| ARG TARGETARCH | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| # --chmod=0550 preserves the executable bit through actions/upload-artifact + | ||
| # download-artifact (which strip exec perms during the roundtrip) without | ||
| # granting world-execute. --chown=nvs:nvs matches the image's only defined | ||
| # non-root user (`nvs:1000`, the NVIDIA distroless convention) and aligns | ||
| # with the Helm chart's `securityContext.runAsUser: 1000`, which overrides | ||
| # the Dockerfile's USER at runtime. | ||
| COPY --chown=nvs:nvs --chmod=0550 deploy/docker/.build/prebuilt-binaries/${TARGETARCH}/openshell-gateway /usr/local/bin/openshell-gateway | ||
|
|
||
| USER nvs:nvs | ||
| EXPOSE 8080 | ||
|
|
||
| ENTRYPOINT ["/usr/local/bin/openshell-gateway"] | ||
| CMD ["--bind-address", "0.0.0.0", "--port", "8080"] | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.