# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # # http://www.apache.org/licenses/LICENSE-2.0 # # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. VERSION 0.8 uv-source: FROM ghcr.io/astral-sh/uv:latest SAVE ARTIFACT /uv uv-base: FROM python:3.12-slim COPY +uv-source/uv /bin/uv RUN uv venv ENV PATH="/app/.venv/bin:$PATH" WORKDIR /app COPY uv.lock pyproject.toml README.md /app RUN uv sync --frozen --no-install-project --no-dev --no-install-workspace --no-editable # Copy project files COPY ai_dynamo_store ai_dynamo_store RUN uv pip install . # Save the entire app directory with installed packages SAVE ARTIFACT /app /app docker: ARG DOCKER_SERVER=my-registry ARG IMAGE_TAG=latest ARG IMAGE=dynamo-api-store FROM nvcr.io/nvidia/distroless/python:3.12-v3.4.13-dev # Copy the entire installed environment from uv-base COPY +uv-base/app /app WORKDIR /app ENV PATH="/app/.venv/bin:$PATH" ENTRYPOINT ["ai-dynamo-store"] SAVE IMAGE --push $DOCKER_SERVER/$IMAGE:$IMAGE_TAG