Unverified Commit a9078ed0 authored by Pavithra Vijayakrishnan's avatar Pavithra Vijayakrishnan Committed by GitHub
Browse files

ci: Adding nightly pipeline workflow (#4204)


Signed-off-by: default avatarpvijayakrish <pvijayakrish@nvidia.com>
Signed-off-by: default avatarPavithra Vijayakrishnan <160681768+pvijayakrish@users.noreply.github.com>
parent d03c0976
...@@ -49,6 +49,12 @@ inputs: ...@@ -49,6 +49,12 @@ inputs:
torch_backend: torch_backend:
description: 'Optional override for TORCH_BACKEND build-arg (e.g., cu129)' description: 'Optional override for TORCH_BACKEND build-arg (e.g., cu129)'
required: false required: false
enable_kvbm:
description: 'Enable KVBM support (optional)'
required: false
dynamo_base_image:
description: 'Pre-built Dynamo base image to use instead of building from scratch'
required: false
outputs: outputs:
image_tag: image_tag:
...@@ -72,14 +78,9 @@ runs: ...@@ -72,14 +78,9 @@ runs:
aws ecr get-login-password --region ${{ inputs.aws_default_region }} | docker login --username AWS --password-stdin ${ECR_HOSTNAME} aws ecr get-login-password --region ${{ inputs.aws_default_region }} | docker login --username AWS --password-stdin ${ECR_HOSTNAME}
- name: Login to NGC - name: Login to NGC
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push' if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push'
shell: bash uses: ./.github/actions/docker-login
run: | with:
echo "${{ inputs.ngc_ci_access_token }}" | docker login nvcr.io -u '$oauthtoken' --password-stdin ngc_ci_access_token: ${{ inputs.ngc_ci_access_token }}
- name: Cleanup
if: always()
shell: bash
run: |
docker system prune -af
- name: Build image - name: Build image
id: build id: build
shell: bash shell: bash
...@@ -125,6 +126,12 @@ runs: ...@@ -125,6 +126,12 @@ runs:
if [ -n "${{ inputs.torch_backend }}" ]; then if [ -n "${{ inputs.torch_backend }}" ]; then
EXTRA_ARGS+=" --build-arg TORCH_BACKEND=${{ inputs.torch_backend }}" EXTRA_ARGS+=" --build-arg TORCH_BACKEND=${{ inputs.torch_backend }}"
fi fi
if [ -n "${{ inputs.dynamo_base_image }}" ]; then
EXTRA_ARGS+=" --dynamo-base-image ${{ inputs.dynamo_base_image }}"
fi
if [ -n "${{ inputs.enable_kvbm }}" ]; then
EXTRA_ARGS+=" --build-arg ENABLE_KVBM=${{ inputs.enable_kvbm }}"
fi
# Execute build and capture output (show on console AND save to file) # Execute build and capture output (show on console AND save to file)
./container/build.sh --tag "$IMAGE_TAG" \ ./container/build.sh --tag "$IMAGE_TAG" \
...@@ -289,7 +296,7 @@ runs: ...@@ -289,7 +296,7 @@ runs:
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
if: always() if: always()
with: with:
name: build-metrics-${{ inputs.framework }}-${{ env.PLATFORM_ARCH }}-${{ github.run_id }}-${{ job.check_run_id }} name: build-metrics-${{ inputs.framework }}-${{ inputs.target }}-${{ env.PLATFORM_ARCH }}-${{ github.run_id }}-${{ job.check_run_id }}
path: build-metrics/build-${{ inputs.framework }}-${{ env.PLATFORM_ARCH }}-${{ github.run_id }}-${{ job.check_run_id }}.json path: build-metrics/build-${{ inputs.framework }}-${{ env.PLATFORM_ARCH }}-${{ github.run_id }}-${{ job.check_run_id }}.json
retention-days: 7 retention-days: 7
name: 'Docker Login'
description: 'Login to multiple container registries (ECR, NGC, ACR)'
inputs:
ngc_ci_access_token:
description: 'NGC CI Access Token'
required: false
aws_default_region:
description: 'AWS Default Region'
required: false
aws_account_id:
description: 'AWS Account ID'
required: false
azure_acr_hostname:
description: 'Azure ACR hostname'
required: false
azure_acr_user:
description: 'Azure ACR user'
required: false
azure_acr_password:
description: 'Azure ACR password'
required: false
runs:
using: "composite"
steps:
- name: ECR Login
shell: bash
if: ${{ inputs.aws_default_region != '' && inputs.aws_account_id != '' }}
env:
ECR_HOSTNAME: ${{ inputs.aws_account_id }}.dkr.ecr.${{ inputs.aws_default_region }}.amazonaws.com
run: |
set -euo pipefail
aws ecr get-login-password --region ${{ inputs.aws_default_region }} | docker login --username AWS --password-stdin "${ECR_HOSTNAME}"
- name: NGC Login
if: ${{ inputs.ngc_ci_access_token != '' }}
shell: bash
run: |
set -euo pipefail
echo "${{ inputs.ngc_ci_access_token }}" | docker login nvcr.io -u '$oauthtoken' --password-stdin
- name: ACR Login
shell: bash
if: ${{ inputs.azure_acr_hostname != '' && inputs.azure_acr_user != '' && inputs.azure_acr_password != '' }}
run: |
set -euo pipefail
echo "${{ inputs.azure_acr_password }}" | docker login "${{ inputs.azure_acr_hostname }}" --username "${{ inputs.azure_acr_user }}" --password-stdin
name: 'Docker Tag and Push'
description: 'Tag and Push Docker Images' description: 'Tag and Push Docker Images'
inputs: inputs:
local_image: local_image:
description: 'Local Image Name:Tag' description: 'Local Image Name:Tag'
required: true required: true
push_tag: push_tags:
description: 'Target Name:Tag' description: 'Target Name:Tag (newline-separated list for multiple tags)'
required: true required: true
aws_push: aws_push:
description: 'Push to AWS Boolean' description: 'Push to AWS Boolean'
...@@ -38,37 +39,48 @@ inputs: ...@@ -38,37 +39,48 @@ inputs:
required: false required: false
outputs: outputs:
image_tag: image_tags:
description: 'Image Tag' description: 'Image Tags'
value: ${{ inputs.push_tag }} value: ${{ inputs.push_tags }}
runs: runs:
using: "composite" using: "composite"
steps: steps:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: ACR Login
shell: bash
if: ${{ inputs.azure_push == 'true' }}
run: |
echo "${{ inputs.azure_acr_password }}" | docker login ${{ inputs.azure_acr_hostname }} --username ${{ inputs.azure_acr_user }} --password-stdin
- name: ECR Tag and Push - name: ECR Tag and Push
shell: bash shell: bash
if: ${{ inputs.aws_push == 'true' }} if: ${{ inputs.aws_push == 'true' }}
env: env:
LOCAL_IMAGE: ${{ inputs.local_image }} LOCAL_IMAGE: ${{ inputs.local_image }}
PUSH_TAG: ${{ inputs.push_tag }} PUSH_TAGS: ${{ inputs.push_tags }}
ECR_HOSTNAME: ${{ inputs.aws_account_id }}.dkr.ecr.${{ inputs.aws_default_region }}.amazonaws.com ECR_HOSTNAME: ${{ inputs.aws_account_id }}.dkr.ecr.${{ inputs.aws_default_region }}.amazonaws.com
run: | run: |
docker tag ${LOCAL_IMAGE} ${ECR_HOSTNAME}/${PUSH_TAG} set -euo pipefail
docker push ${ECR_HOSTNAME}/${PUSH_TAG} while IFS= read -r TAG; do
if [ -z "$TAG" ]; then
continue
fi
echo "Tagging and pushing: ${ECR_HOSTNAME}/${TAG}"
docker tag "${LOCAL_IMAGE}" "${ECR_HOSTNAME}/${TAG}"
docker push "${ECR_HOSTNAME}/${TAG}"
done <<< "$PUSH_TAGS"
- name: ACR Tag and Push - name: ACR Tag and Push
shell: bash shell: bash
if: ${{ inputs.azure_push == 'true' }} if: ${{ inputs.azure_push == 'true' }}
env: env:
LOCAL_IMAGE: ${{ inputs.local_image }} LOCAL_IMAGE: ${{ inputs.local_image }}
PUSH_TAG: ${{ inputs.push_tag }} PUSH_TAGS: ${{ inputs.push_tags }}
AZURE_ACR_HOSTNAME: ${{ inputs.azure_acr_hostname }} AZURE_ACR_HOSTNAME: ${{ inputs.azure_acr_hostname }}
run: | run: |
docker tag ${LOCAL_IMAGE} ${AZURE_ACR_HOSTNAME}/${PUSH_TAG} set -euo pipefail
docker push ${AZURE_ACR_HOSTNAME}/${PUSH_TAG} while IFS= read -r TAG; do
if [ -z "$TAG" ]; then
continue
fi
echo "Tagging and pushing: ${AZURE_ACR_HOSTNAME}/${TAG}"
docker tag "${LOCAL_IMAGE}" "${AZURE_ACR_HOSTNAME}/${TAG}"
docker push "${AZURE_ACR_HOSTNAME}/${TAG}"
done <<< "$PUSH_TAGS"
...@@ -24,6 +24,10 @@ inputs: ...@@ -24,6 +24,10 @@ inputs:
description: 'Platform architecture (amd64, arm64)' description: 'Platform architecture (amd64, arm64)'
required: false required: false
default: 'amd64' default: 'amd64'
dry_run:
description: 'Run pytest in dry-run mode (collect tests only, do not execute)'
required: false
default: 'false'
runs: runs:
...@@ -54,21 +58,32 @@ runs: ...@@ -54,21 +58,32 @@ runs:
# Run pytest with detailed output and JUnit XML # Run pytest with detailed output and JUnit XML
set +e # Don't exit on test failures set +e # Don't exit on test failures
# Determine docker runtime flags and pytest command based on dry_run mode
if [[ "${{ inputs.dry_run }}" == "true" ]]; then
echo "🔍 Running pytest in dry-run mode (collect-only, no GPU required)"
GPU_FLAGS=""
PYTEST_CMD="pytest -v --collect-only -m \"${{ inputs.pytest_marks }}\""
else
echo "🚀 Running pytest in normal mode"
PYTEST_CMD="pytest -v --tb=short --basetemp=/tmp -o cache_dir=/tmp/.pytest_cache --junitxml=/workspace/test-results/${{ env.PYTEST_XML_FILE }} --durations=10 -m \"${{ inputs.pytest_marks }}\""
# Detect GPU availability and conditionally add GPU flags # Detect GPU availability and conditionally add GPU flags
GPU_FLAGS="" GPU_FLAGS=""
if command -v nvidia-smi &> /dev/null && nvidia-smi &> /dev/null; then if command -v nvidia-smi &> /dev/null && nvidia-smi &> /dev/null; then
echo "GPU detected, enabling GPU runtime" echo "GPU detected, enabling GPU runtime"
GPU_FLAGS="--runtime=nvidia --gpus all" GPU_FLAGS="--runtime=nvidia --gpus all"
else else
echo "No GPU detected, running in CPU-only mode" echo "⚠️ No GPU detected, running in CPU-only mode"
fi
fi fi
docker run ${GPU_FLAGS} --rm -w /workspace \ # Run without --rm so we can copy results even if container crashes (example SIGSEGV exit 139)
docker run ${GPU_FLAGS} -w /workspace \
--cpus=${NUM_CPUS} \ --cpus=${NUM_CPUS} \
--network host \ --network host \
--name ${{ env.CONTAINER_ID }}_pytest \ --name ${{ env.CONTAINER_ID }}_pytest \
${{ inputs.image_tag }} \ ${{ inputs.image_tag }} \
bash -c "mkdir -p /workspace/test-results && pytest -v --tb=short --basetemp=/tmp -o cache_dir=/tmp/.pytest_cache --junitxml=/workspace/test-results/${{ env.PYTEST_XML_FILE }} --durations=10 -m \"${{ inputs.pytest_marks }}\"" bash -c "mkdir -p /workspace/test-results && ${PYTEST_CMD}"
TEST_EXIT_CODE=$? TEST_EXIT_CODE=$?
echo "TEST_EXIT_CODE=${TEST_EXIT_CODE}" >> $GITHUB_ENV echo "TEST_EXIT_CODE=${TEST_EXIT_CODE}" >> $GITHUB_ENV
...@@ -92,6 +107,13 @@ runs: ...@@ -92,6 +107,13 @@ runs:
STR_TEST_TYPE=$(echo "${{ inputs.test_type }}" | tr ', ' '_') STR_TEST_TYPE=$(echo "${{ inputs.test_type }}" | tr ', ' '_')
echo "STR_TEST_TYPE=${STR_TEST_TYPE}" >> $GITHUB_ENV echo "STR_TEST_TYPE=${STR_TEST_TYPE}" >> $GITHUB_ENV
# Skip XML processing if in dry-run mode
if [[ "${{ inputs.dry_run }}" == "true" ]]; then
echo "✅ Dry-run mode: Test collection completed"
echo "⏭️ No JUnit XML generated (dry-run mode)"
exit 0
fi
# Check for JUnit XML file and determine test status # Check for JUnit XML file and determine test status
JUNIT_FILE="test-results/pytest_test_report.xml" JUNIT_FILE="test-results/pytest_test_report.xml"
...@@ -133,7 +155,7 @@ runs: ...@@ -133,7 +155,7 @@ runs:
- name: Upload Test Results - name: Upload Test Results
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
if: always() # Always upload test results, even if tests failed if: always() && inputs.dry_run != 'true' # Skip upload in dry-run mode
with: with:
name: test-results-${{ inputs.framework }}-${{ env.STR_TEST_TYPE }}-${{ env.PLATFORM_ARCH }} name: test-results-${{ inputs.framework }}-${{ env.STR_TEST_TYPE }}-${{ env.PLATFORM_ARCH }}
path: | path: |
......
...@@ -72,11 +72,10 @@ jobs: ...@@ -72,11 +72,10 @@ jobs:
with: with:
driver: docker driver: docker
- name: Login to ECR - name: Login to ECR
shell: bash uses: ./.github/actions/docker-login
env: with:
ECR_HOSTNAME: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_DEFAULT_REGION }}.amazonaws.com aws_default_region: ${{ secrets.AWS_DEFAULT_REGION }}
run: | aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }}
aws ecr get-login-password --region ${{ secrets.AWS_DEFAULT_REGION }} | docker login --username AWS --password-stdin ${ECR_HOSTNAME}
- name: Linter - name: Linter
shell: bash shell: bash
env: env:
...@@ -120,7 +119,7 @@ jobs: ...@@ -120,7 +119,7 @@ jobs:
uses: ./.github/actions/docker-tag-push uses: ./.github/actions/docker-tag-push
with: with:
local_image: dynamo-operator:latest local_image: dynamo-operator:latest
push_tag: ai-dynamo/dynamo:${{ github.sha }}-operator-${{ matrix.platform.arch }} push_tags: ai-dynamo/dynamo:${{ github.sha }}-operator-${{ matrix.platform.arch }}
aws_push: 'false' aws_push: 'false'
azure_push: 'true' azure_push: 'true'
aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }} aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }}
...@@ -165,11 +164,18 @@ jobs: ...@@ -165,11 +164,18 @@ jobs:
aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }} aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }}
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Login to Container Registries
uses: ./.github/actions/docker-login
with:
azure_acr_hostname: ${{ secrets.AZURE_ACR_HOSTNAME }}
azure_acr_user: ${{ secrets.AZURE_ACR_USER }}
azure_acr_password: ${{ secrets.AZURE_ACR_PASSWORD }}
ngc_ci_access_token: ${{ secrets.NGC_CI_ACCESS_TOKEN }}
- name: Docker Tag and Push - name: Docker Tag and Push
uses: ./.github/actions/docker-tag-push uses: ./.github/actions/docker-tag-push
with: with:
local_image: ${{ steps.build-image.outputs.image_tag }} local_image: ${{ steps.build-image.outputs.image_tag }}
push_tag: ai-dynamo/dynamo:${{ github.sha }}-vllm-${{ matrix.platform.arch }} push_tags: ai-dynamo/dynamo:${{ github.sha }}-vllm-${{ matrix.platform.arch }}
# OPS-1145: Switch aws_push to true # OPS-1145: Switch aws_push to true
aws_push: 'false' aws_push: 'false'
azure_push: 'true' azure_push: 'true'
...@@ -223,11 +229,18 @@ jobs: ...@@ -223,11 +229,18 @@ jobs:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Login to Container Registries
uses: ./.github/actions/docker-login
with:
azure_acr_hostname: ${{ secrets.AZURE_ACR_HOSTNAME }}
azure_acr_user: ${{ secrets.AZURE_ACR_USER }}
azure_acr_password: ${{ secrets.AZURE_ACR_PASSWORD }}
ngc_ci_access_token: ${{ secrets.NGC_CI_ACCESS_TOKEN }}
- name: Docker Tag and Push - name: Docker Tag and Push
uses: ./.github/actions/docker-tag-push uses: ./.github/actions/docker-tag-push
with: with:
local_image: ${{ steps.build-image.outputs.image_tag }} local_image: ${{ steps.build-image.outputs.image_tag }}
push_tag: ai-dynamo/dynamo:${{ github.sha }}-sglang-${{ matrix.platform.arch }} push_tags: ai-dynamo/dynamo:${{ github.sha }}-sglang-${{ matrix.platform.arch }}
# OPS-1145: Switch aws_push to true # OPS-1145: Switch aws_push to true
aws_push: 'false' aws_push: 'false'
azure_push: 'true' azure_push: 'true'
...@@ -281,11 +294,18 @@ jobs: ...@@ -281,11 +294,18 @@ jobs:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Login to Container Registries
uses: ./.github/actions/docker-login
with:
azure_acr_hostname: ${{ secrets.AZURE_ACR_HOSTNAME }}
azure_acr_user: ${{ secrets.AZURE_ACR_USER }}
azure_acr_password: ${{ secrets.AZURE_ACR_PASSWORD }}
ngc_ci_access_token: ${{ secrets.NGC_CI_ACCESS_TOKEN }}
- name: Docker Tag and Push - name: Docker Tag and Push
uses: ./.github/actions/docker-tag-push uses: ./.github/actions/docker-tag-push
with: with:
local_image: ${{ steps.build-image.outputs.image_tag }} local_image: ${{ steps.build-image.outputs.image_tag }}
push_tag: ai-dynamo/dynamo:${{ github.sha }}-trtllm-${{ matrix.platform.arch }} push_tags: ai-dynamo/dynamo:${{ github.sha }}-trtllm-${{ matrix.platform.arch }}
# OPS-1145: Switch aws_push to true # OPS-1145: Switch aws_push to true
aws_push: 'false' aws_push: 'false'
azure_push: 'true' azure_push: 'true'
......
...@@ -33,8 +33,9 @@ jobs: ...@@ -33,8 +33,9 @@ jobs:
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Login to NGC - name: Login to NGC
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push' if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push'
run: | uses: ./.github/actions/docker-login
echo "${{ secrets.NGC_CI_ACCESS_TOKEN }}" | docker login nvcr.io -u '$oauthtoken' --password-stdin with:
ngc_ci_access_token: ${{ secrets.NGC_CI_ACCESS_TOKEN }}
- name: Define Image Tag - name: Define Image Tag
id: define_image_tag id: define_image_tag
run: | run: |
......
This diff is collapsed.
...@@ -384,10 +384,15 @@ RUN uv pip install \ ...@@ -384,10 +384,15 @@ RUN uv pip install \
/opt/dynamo/wheelhouse/ai_dynamo*any.whl \ /opt/dynamo/wheelhouse/ai_dynamo*any.whl \
/opt/dynamo/wheelhouse/nixl/nixl*.whl && \ /opt/dynamo/wheelhouse/nixl/nixl*.whl && \
if [ "$ENABLE_KVBM" = "true" ]; then \ if [ "$ENABLE_KVBM" = "true" ]; then \
uv pip install /opt/dynamo/wheelhouse/kvbm*.whl; \ KVBM_WHEEL=$(ls /opt/dynamo/wheelhouse/kvbm*.whl 2>/dev/null | head -1); \
fi \ if [ -z "$KVBM_WHEEL" ]; then \
&& cd /workspace/benchmarks \ echo "ERROR: ENABLE_KVBM is true but no KVBM wheel found in wheelhouse" >&2; \
&& UV_GIT_LFS=1 uv pip install --no-cache . exit 1; \
fi; \
uv pip install "$KVBM_WHEEL"; \
fi && \
cd /workspace/benchmarks && \
UV_GIT_LFS=1 uv pip install --no-cache .
# Setup launch banner in common directory accessible to all users # Setup launch banner in common directory accessible to all users
RUN --mount=type=bind,source=./container/launch_message/runtime.txt,target=/opt/dynamo/launch_message.txt \ RUN --mount=type=bind,source=./container/launch_message/runtime.txt,target=/opt/dynamo/launch_message.txt \
......
...@@ -376,6 +376,7 @@ RUN chmod 755 /opt/dynamo/.launch_screen && \ ...@@ -376,6 +376,7 @@ RUN chmod 755 /opt/dynamo/.launch_screen && \
USER dynamo USER dynamo
# Copy tests, benchmarks, deploy and components for CI with correct ownership # Copy tests, benchmarks, deploy and components for CI with correct ownership
COPY --chown=dynamo: pyproject.toml /workspace/
COPY --chown=dynamo: tests /workspace/tests COPY --chown=dynamo: tests /workspace/tests
COPY --chown=dynamo: examples /workspace/examples COPY --chown=dynamo: examples /workspace/examples
COPY --chown=dynamo: benchmarks /workspace/benchmarks COPY --chown=dynamo: benchmarks /workspace/benchmarks
...@@ -477,7 +478,7 @@ RUN curl --retry 3 --retry-delay 2 -LSso /usr/local/bin/clang-format https://git ...@@ -477,7 +478,7 @@ RUN curl --retry 3 --retry-delay 2 -LSso /usr/local/bin/clang-format https://git
&& rm -rf clangd_18.1.3 clangd.zip && rm -rf clangd_18.1.3 clangd.zip
# Editable install of dynamo # Editable install of dynamo
COPY pyproject.toml README.md hatch_build.py /workspace/ COPY README.md hatch_build.py /workspace/
RUN python3 -m pip install --no-deps -e . RUN python3 -m pip install --no-deps -e .
# Install Python development packages # Install Python development packages
......
...@@ -334,12 +334,17 @@ RUN uv pip install \ ...@@ -334,12 +334,17 @@ RUN uv pip install \
--no-cache \ --no-cache \
/opt/dynamo/wheelhouse/ai_dynamo_runtime*.whl \ /opt/dynamo/wheelhouse/ai_dynamo_runtime*.whl \
/opt/dynamo/wheelhouse/ai_dynamo*any.whl \ /opt/dynamo/wheelhouse/ai_dynamo*any.whl \
/opt/dynamo/wheelhouse/nixl/nixl*.whl \ /opt/dynamo/wheelhouse/nixl/nixl*.whl && \
&& if [ "${ENABLE_KVBM}" = "true" ]; then \ if [ "${ENABLE_KVBM}" = "true" ]; then \
uv pip install --no-cache /opt/dynamo/wheelhouse/kvbm*.whl; \ KVBM_WHEEL=$(ls /opt/dynamo/wheelhouse/kvbm*.whl 2>/dev/null | head -1); \
fi \ if [ -z "$KVBM_WHEEL" ]; then \
&& cd /workspace/benchmarks \ echo "ERROR: ENABLE_KVBM is true but no KVBM wheel found in wheelhouse" >&2; \
&& UV_GIT_LFS=1 uv pip install --no-cache . exit 1; \
fi; \
uv pip install --no-cache "$KVBM_WHEEL"; \
fi && \
cd /workspace/benchmarks && \
UV_GIT_LFS=1 uv pip install --no-cache .
# Install common and test dependencies # Install common and test dependencies
RUN --mount=type=bind,source=./container/deps/requirements.txt,target=/tmp/requirements.txt \ RUN --mount=type=bind,source=./container/deps/requirements.txt,target=/tmp/requirements.txt \
...@@ -352,7 +357,8 @@ RUN --mount=type=bind,source=./container/deps/requirements.txt,target=/tmp/requi ...@@ -352,7 +357,8 @@ RUN --mount=type=bind,source=./container/deps/requirements.txt,target=/tmp/requi
--requirement /tmp/requirements.test.txt \ --requirement /tmp/requirements.test.txt \
cupy-cuda13x cupy-cuda13x
# Copy tests, benchmarks, deploy and components for CI # Copy tests, benchmarks, deploy and components for CI with correct ownership
COPY --chown=dynamo: pyproject.toml /workspace/
COPY --chown=dynamo: tests /workspace/tests COPY --chown=dynamo: tests /workspace/tests
COPY --chown=dynamo: examples /workspace/examples COPY --chown=dynamo: examples /workspace/examples
COPY --chown=dynamo: deploy /workspace/deploy COPY --chown=dynamo: deploy /workspace/deploy
...@@ -442,7 +448,7 @@ COPY --from=dynamo_base /usr/local/cargo /usr/local/cargo ...@@ -442,7 +448,7 @@ COPY --from=dynamo_base /usr/local/cargo /usr/local/cargo
RUN uv pip install --no-cache maturin[patchelf] RUN uv pip install --no-cache maturin[patchelf]
# Editable install of dynamo # Editable install of dynamo
COPY pyproject.toml README.md hatch_build.py /workspace/ COPY README.md hatch_build.py /workspace/
RUN uv pip install --no-cache --no-deps -e . RUN uv pip install --no-cache --no-deps -e .
CMD [] CMD []
...@@ -275,12 +275,17 @@ COPY --chown=dynamo: --from=dynamo_base /opt/dynamo/wheelhouse/ /opt/dynamo/whee ...@@ -275,12 +275,17 @@ COPY --chown=dynamo: --from=dynamo_base /opt/dynamo/wheelhouse/ /opt/dynamo/whee
RUN uv pip install \ RUN uv pip install \
/opt/dynamo/wheelhouse/ai_dynamo_runtime*.whl \ /opt/dynamo/wheelhouse/ai_dynamo_runtime*.whl \
/opt/dynamo/wheelhouse/ai_dynamo*any.whl \ /opt/dynamo/wheelhouse/ai_dynamo*any.whl \
/opt/dynamo/wheelhouse/nixl/nixl*.whl \ /opt/dynamo/wheelhouse/nixl/nixl*.whl && \
&& if [ "${ENABLE_KVBM}" = "true" ]; then \ if [ "${ENABLE_KVBM}" = "true" ]; then \
uv pip install /opt/dynamo/wheelhouse/kvbm*.whl; \ KVBM_WHEEL=$(ls /opt/dynamo/wheelhouse/kvbm*.whl 2>/dev/null | head -1); \
fi \ if [ -z "$KVBM_WHEEL" ]; then \
&& cd /workspace/benchmarks \ echo "ERROR: ENABLE_KVBM is true but no KVBM wheel found in wheelhouse" >&2; \
&& UV_GIT_LFS=1 uv pip install --no-cache . exit 1; \
fi; \
uv pip install "$KVBM_WHEEL"; \
fi && \
cd /workspace/benchmarks && \
UV_GIT_LFS=1 uv pip install --no-cache .
# Install common and test dependencies # Install common and test dependencies
RUN --mount=type=bind,source=./container/deps/requirements.txt,target=/tmp/requirements.txt \ RUN --mount=type=bind,source=./container/deps/requirements.txt,target=/tmp/requirements.txt \
......
...@@ -898,7 +898,7 @@ if [[ -z "${DEV_IMAGE_INPUT:-}" ]]; then ...@@ -898,7 +898,7 @@ if [[ -z "${DEV_IMAGE_INPUT:-}" ]]; then
# Use BuildKit for enhanced metadata # Use BuildKit for enhanced metadata
if [ -z "$RUN_PREFIX" ]; then if [ -z "$RUN_PREFIX" ]; then
if docker buildx version &>/dev/null; then if docker buildx version &>/dev/null; then
docker buildx build --progress=plain --load -f "${SOURCE_DIR}/Dockerfile" --target runtime $PLATFORM $BUILD_ARGS $CACHE_FROM $CACHE_TO --tag $DYNAMO_BASE_IMAGE $BUILD_CONTEXT_ARG $BUILD_CONTEXT $NO_CACHE 2>&1 | tee "${BASE_BUILD_LOG}" docker buildx build --builder default --progress=plain --load -f "${SOURCE_DIR}/Dockerfile" --target runtime $PLATFORM $BUILD_ARGS $CACHE_FROM $CACHE_TO --tag $DYNAMO_BASE_IMAGE $BUILD_CONTEXT_ARG $BUILD_CONTEXT $NO_CACHE 2>&1 | tee "${BASE_BUILD_LOG}"
BUILD_EXIT_CODE=${PIPESTATUS[0]} BUILD_EXIT_CODE=${PIPESTATUS[0]}
else else
DOCKER_BUILDKIT=1 docker build --progress=plain -f "${SOURCE_DIR}/Dockerfile" --target runtime $PLATFORM $BUILD_ARGS $CACHE_FROM $CACHE_TO --tag $DYNAMO_BASE_IMAGE $BUILD_CONTEXT_ARG $BUILD_CONTEXT $NO_CACHE 2>&1 | tee "${BASE_BUILD_LOG}" DOCKER_BUILDKIT=1 docker build --progress=plain -f "${SOURCE_DIR}/Dockerfile" --target runtime $PLATFORM $BUILD_ARGS $CACHE_FROM $CACHE_TO --tag $DYNAMO_BASE_IMAGE $BUILD_CONTEXT_ARG $BUILD_CONTEXT $NO_CACHE 2>&1 | tee "${BASE_BUILD_LOG}"
...@@ -924,7 +924,7 @@ if [[ -z "${DEV_IMAGE_INPUT:-}" ]]; then ...@@ -924,7 +924,7 @@ if [[ -z "${DEV_IMAGE_INPUT:-}" ]]; then
# Use BuildKit for enhanced metadata # Use BuildKit for enhanced metadata
if [ -z "$RUN_PREFIX" ]; then if [ -z "$RUN_PREFIX" ]; then
if docker buildx version &>/dev/null; then if docker buildx version &>/dev/null; then
docker buildx build --progress=plain --load -f $DOCKERFILE $TARGET_STR $PLATFORM $BUILD_ARGS $CACHE_FROM $CACHE_TO $TAG $LATEST_TAG $BUILD_CONTEXT_ARG $BUILD_CONTEXT $NO_CACHE 2>&1 | tee "${FRAMEWORK_BUILD_LOG}" docker buildx build --builder default --progress=plain --load -f $DOCKERFILE $TARGET_STR $PLATFORM $BUILD_ARGS $CACHE_FROM $CACHE_TO $TAG $LATEST_TAG $BUILD_CONTEXT_ARG $BUILD_CONTEXT $NO_CACHE 2>&1 | tee "${FRAMEWORK_BUILD_LOG}"
BUILD_EXIT_CODE=${PIPESTATUS[0]} BUILD_EXIT_CODE=${PIPESTATUS[0]}
else else
DOCKER_BUILDKIT=1 docker build --progress=plain -f $DOCKERFILE $TARGET_STR $PLATFORM $BUILD_ARGS $CACHE_FROM $CACHE_TO $TAG $LATEST_TAG $BUILD_CONTEXT_ARG $BUILD_CONTEXT $NO_CACHE 2>&1 | tee "${FRAMEWORK_BUILD_LOG}" DOCKER_BUILDKIT=1 docker build --progress=plain -f $DOCKERFILE $TARGET_STR $PLATFORM $BUILD_ARGS $CACHE_FROM $CACHE_TO $TAG $LATEST_TAG $BUILD_CONTEXT_ARG $BUILD_CONTEXT $NO_CACHE 2>&1 | tee "${FRAMEWORK_BUILD_LOG}"
...@@ -946,7 +946,7 @@ if [[ -z "${DEV_IMAGE_INPUT:-}" ]]; then ...@@ -946,7 +946,7 @@ if [[ -z "${DEV_IMAGE_INPUT:-}" ]]; then
# Use BuildKit for enhanced metadata # Use BuildKit for enhanced metadata
if [ -z "$RUN_PREFIX" ]; then if [ -z "$RUN_PREFIX" ]; then
if docker buildx version &>/dev/null; then if docker buildx version &>/dev/null; then
docker buildx build --progress=plain --load -f $DOCKERFILE $TARGET_STR $PLATFORM $BUILD_ARGS $CACHE_FROM $CACHE_TO $TAG $LATEST_TAG $BUILD_CONTEXT_ARG $BUILD_CONTEXT $NO_CACHE 2>&1 | tee "${SINGLE_BUILD_LOG}" docker buildx build --builder default --progress=plain --load -f $DOCKERFILE $TARGET_STR $PLATFORM $BUILD_ARGS $CACHE_FROM $CACHE_TO $TAG $LATEST_TAG $BUILD_CONTEXT_ARG $BUILD_CONTEXT $NO_CACHE 2>&1 | tee "${SINGLE_BUILD_LOG}"
BUILD_EXIT_CODE=${PIPESTATUS[0]} BUILD_EXIT_CODE=${PIPESTATUS[0]}
else else
DOCKER_BUILDKIT=1 docker build --progress=plain -f $DOCKERFILE $TARGET_STR $PLATFORM $BUILD_ARGS $CACHE_FROM $CACHE_TO $TAG $LATEST_TAG $BUILD_CONTEXT_ARG $BUILD_CONTEXT $NO_CACHE 2>&1 | tee "${SINGLE_BUILD_LOG}" DOCKER_BUILDKIT=1 docker build --progress=plain -f $DOCKERFILE $TARGET_STR $PLATFORM $BUILD_ARGS $CACHE_FROM $CACHE_TO $TAG $LATEST_TAG $BUILD_CONTEXT_ARG $BUILD_CONTEXT $NO_CACHE 2>&1 | tee "${SINGLE_BUILD_LOG}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment