-
Notifications
You must be signed in to change notification settings - Fork 688
build: OPS-810: add dynamo frontend image w/EPP support #4150
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
17 commits
Select commit
Hold shift + click to select a range
5aa0c5a
initial commit for frontend image deployment
nv-tusharma 48ced8f
fixes
nv-tusharma 55c140b
Initial commit for frontend image
nv-tusharma cbf764e
Merge branch 'main' into tusharma/add-frontend-image
nv-tusharma 75b36ac
Change base image of dev stage
nv-tusharma a48f140
revert some unncessary changes that were brought in
nv-tusharma e6475ae
Merge branch 'main' into tusharma/add-frontend-image
nv-tusharma 4d932ae
commit latest changes from dockerfile
nv-tusharma 560e5bd
Add frontend container to seperately build frontend image with epp
nv-tusharma d1da486
Merge branch 'main' into tusharma/add-frontend-image
nv-tusharma b0a137d
fix spacing in base dockerfile
nv-tusharma 6573cc1
remove frontend from GHA workflow
nv-tusharma ac44519
update user permissions for frontend container
nv-tusharma c0c1f3d
add documentation + productionize image
nv-tusharma e57f00f
fix trailing whitespace
nv-tusharma ddd1271
copy venv from dev stage, remove unnecessary packages
nv-tusharma 9d43a44
update entrypoint to use epp automatically
nv-tusharma 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| # syntax=docker/dockerfile:1.10.0 | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| ARG DYNAMO_BASE_IMAGE="dynamo:latest-none" | ||
| ARG EPP_IMAGE="us-central1-docker.pkg.dev/k8s-staging-images/gateway-api-inference-extension/epp:v0.5.1-dirty" | ||
| ARG PYTHON_VERSION=3.12 | ||
|
|
||
| FROM ${DYNAMO_BASE_IMAGE} AS dynamo_base | ||
|
|
||
| FROM ${EPP_IMAGE} AS epp | ||
|
|
||
| FROM nvcr.io/nvidia/base/ubuntu:noble-20250619 AS frontend | ||
|
|
||
| ARG PYTHON_VERSION | ||
| RUN apt-get update -y \ | ||
| && apt-get install -y --no-install-recommends \ | ||
| # required for EPP | ||
| ca-certificates \ | ||
| libstdc++6 \ | ||
| && apt-get clean \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
|
|
||
| # Create dynamo user with group 0 for OpenShift compatibility | ||
| RUN userdel -r ubuntu > /dev/null 2>&1 || true \ | ||
| && useradd -m -s /bin/bash -g 0 dynamo \ | ||
| && [ `id -u dynamo` -eq 1000 ] \ | ||
| && mkdir -p /home/dynamo/.cache /opt/dynamo /workspace \ | ||
| && chown -R dynamo: /opt/dynamo /home/dynamo/.cache /workspace \ | ||
| && chmod -R g+w /opt/dynamo /home/dynamo/.cache /workspace | ||
|
|
||
| # Set HOME so ModelExpress can find the cache directory | ||
| ENV HOME=/home/dynamo | ||
|
|
||
| # Switch to dynamo user | ||
| USER dynamo | ||
| ENV DYNAMO_HOME=/opt/dynamo | ||
|
|
||
| WORKDIR / | ||
| COPY --chown=dynamo: --from=epp /epp /epp | ||
|
|
||
nv-tusharma marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| COPY --chown=dynamo: container/launch_message.txt /opt/dynamo/.launch_screen | ||
| # Copy tests, benchmarks, deploy and components with correct ownership | ||
| COPY --chown=dynamo: tests /workspace/tests | ||
| COPY --chown=dynamo: examples /workspace/examples | ||
| COPY --chown=dynamo: benchmarks /workspace/benchmarks | ||
| COPY --chown=dynamo: deploy /workspace/deploy | ||
| COPY --chown=dynamo: components/ /workspace/components/ | ||
| COPY --chown=dynamo: recipes/ /workspace/recipes/ | ||
| # Copy attribution files with correct ownership | ||
| COPY --chown=dynamo: ATTRIBUTION* LICENSE /workspace/ | ||
|
|
||
| ENV VIRTUAL_ENV=/opt/dynamo/venv | ||
| ENV PATH="/opt/dynamo/venv/bin:$PATH" | ||
| # Copy virtual environment directly from dynamo_base (dev image) | ||
| # This includes all installed packages: dynamo, nixl, requirements.txt, requirements.test.txt | ||
| # Copy uv to system /bin | ||
| COPY --from=dynamo_base /bin/uv /bin/uvx /bin/ | ||
| RUN uv python install $PYTHON_VERSION | ||
| COPY --chown=dynamo: --from=dynamo_base /opt/dynamo/venv/ /opt/dynamo/venv/ | ||
|
|
||
| # Setup environment for all users | ||
| USER root | ||
| RUN chmod 755 /opt/dynamo/.launch_screen && \ | ||
| echo 'source /opt/dynamo/venv/bin/activate' >> /etc/bash.bashrc && \ | ||
| echo 'cat /opt/dynamo/.launch_screen' >> /etc/bash.bashrc | ||
|
|
||
| USER dynamo | ||
|
|
||
| ENTRYPOINT ["/epp"] | ||
| CMD ["/bin/bash"] | ||
|
|
||
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
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.