diff --git a/.github/workflows/container-validation-backends.yml b/.github/workflows/container-validation-backends.yml index f7f0a97031..4fe18369a8 100644 --- a/.github/workflows/container-validation-backends.yml +++ b/.github/workflows/container-validation-backends.yml @@ -218,16 +218,16 @@ jobs: framework: "sglang" test_type: "unit" platform_arch: ${{ matrix.platform.arch }} - - name: Run e2e tests - # OPS-1140: Uncomment the below line - # if: ${{ matrix.platform.arch != 'arm64' }} - uses: ./.github/actions/pytest - with: - image_tag: ${{ steps.build-image.outputs.image_tag }} - pytest_marks: "e2e and sglang and gpu_1" - framework: "sglang" - test_type: "e2e, gpu_1" - platform_arch: ${{ matrix.platform.arch }} + # - name: Run e2e tests + # # OPS-1140: Uncomment the below line + # # if: ${{ matrix.platform.arch != 'arm64' }} + # uses: ./.github/actions/pytest + # with: + # image_tag: ${{ steps.build-image.outputs.image_tag }} + # pytest_marks: "e2e and sglang and gpu_1" + # framework: "sglang" + # test_type: "e2e, gpu_1" + # platform_arch: ${{ matrix.platform.arch }} trtllm: needs: changed-files @@ -342,264 +342,271 @@ jobs: # Upload complete workflow metrics including container metrics python3 .github/workflows/upload_complete_workflow_metrics.py - # deploy-test-vllm: - # runs-on: cpu-amd-m5-2xlarge - # if: needs.changed-files.outputs.has_code_changes == 'true' - # needs: [changed-files, operator, vllm] - # permissions: - # contents: read - # strategy: - # fail-fast: false - # matrix: - # profile: - # - agg - # - agg_router - # - disagg - # - disagg_router - # name: deploy-test-vllm (${{ matrix.profile }}) - # env: - # FRAMEWORK: vllm - # DYNAMO_INGRESS_SUFFIX: dev.aire.nvidia.com - # DEPLOYMENT_FILE: "deploy/${{ matrix.profile }}.yaml" - # MODEL_NAME: "Qwen/Qwen3-0.6B" - # steps: &deploy-test-steps - # - uses: actions/checkout@v4 - # - name: Set namespace and install dependencies - # run: | - # # Set namespace using FRAMEWORK env var - # PROFILE_SANITIZED="${{ matrix.profile }}" - # PROFILE_SANITIZED="${PROFILE_SANITIZED//_/-}" - # echo "NAMESPACE=gh-job-id-${{ github.run_id }}-${FRAMEWORK}-${PROFILE_SANITIZED}" >> $GITHUB_ENV - - # set -x - # # Install dependencies - # sudo apt-get update && sudo apt-get install -y curl bash openssl gettext git jq - - # # Install yq - # echo "Installing yq..." - # curl -L https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o yq - # sudo chmod 755 yq - # sudo mv yq /usr/local/bin/ - # # Install Helm - # echo "Installing Helm..." - # curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 - # sudo chmod 700 get_helm.sh - # sudo ./get_helm.sh - # # Install kubectl - # curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" - # sudo chmod 755 kubectl - # sudo mv kubectl /usr/local/bin/ - - # # Setup kubeconfig - # echo "${{ secrets.AZURE_AKS_CI_KUBECONFIG_B64 }}" | base64 -d > .kubeconfig - # chmod 600 .kubeconfig - # export KUBECONFIG=$(pwd)/.kubeconfig - # kubectl config set-context --current --namespace=$NAMESPACE --kubeconfig "${KUBECONFIG}" - # kubectl config current-context - # - name: Deploy Operator - # run: | - # set -x - # export KUBECONFIG=$(pwd)/.kubeconfig - - # # Create a namespace for this job - # echo "Creating an ephemeral namespace..." - # kubectl delete namespace $NAMESPACE || true - # kubectl create namespace $NAMESPACE || true - # echo "Attaching the labels for secrets and cleanup" - # kubectl label namespaces ${NAMESPACE} nscleanup/enabled=true nscleanup/ttl=7200 gitlab-imagepull=enabled ngc-api=enabled nvcr-imagepull=enabled --overwrite=true - - # # Set the namespace as default - # kubectl config set-context --current --namespace=$NAMESPACE - - # # Check if Istio is installed - # kubectl get pods -n istio-system - # # Check if default storage class exists - # kubectl get storageclass - - # # Install Helm chart - # export IMAGE_TAG=$(cat build.env) - # echo $IMAGE_TAG - # export VIRTUAL_ENV=/opt/dynamo/venv - # export KUBE_NS=$NAMESPACE - # export ISTIO_ENABLED=true - # export ISTIO_GATEWAY=istio-system/ingress-alb - # export VIRTUAL_SERVICE_SUPPORTS_HTTPS=true - # export DYNAMO_CLOUD=https://${NAMESPACE}.${DYNAMO_INGRESS_SUFFIX} - - # # Install dynamo env secrets - # kubectl create secret generic hf-token-secret --from-literal=HF_TOKEN=${{ secrets.HF_TOKEN }} -n $KUBE_NS || true - # # Create docker pull secret for operator image - # kubectl create secret docker-registry docker-imagepullsecret --docker-server=${{ secrets.AZURE_ACR_HOSTNAME }} --docker-username=${{ secrets.AZURE_ACR_USER }} --docker-password=${{ secrets.AZURE_ACR_PASSWORD }} --namespace=${NAMESPACE} - # # Install helm dependencies - # helm repo add bitnami https://charts.bitnami.com/bitnami - # cd deploy/cloud/helm/platform/ - # helm dep build . - # # Install platform with namespace restriction for single profile testing - # helm upgrade --install dynamo-platform . --namespace ${NAMESPACE} \ - # --set dynamo-operator.namespaceRestriction.enabled=true \ - # --set dynamo-operator.namespaceRestriction.allowedNamespaces[0]=${NAMESPACE} \ - # --set dynamo-operator.controllerManager.manager.image.repository=${{ secrets.AZURE_ACR_HOSTNAME }}/ai-dynamo/dynamo \ - # --set dynamo-operator.controllerManager.manager.image.tag=${{ github.sha }}-operator-amd64 \ - # --set dynamo-operator.imagePullSecrets[0].name=docker-imagepullsecret - # # Wait for all deployments to be ready - # timeout 300s kubectl rollout status deployment -n $NAMESPACE --watch - # cd - - - # export KUBECONFIG=$(pwd)/.kubeconfig - # kubectl config set-context --current --namespace=$NAMESPACE - - # cd components/backends/$FRAMEWORK - # export FRAMEWORK_RUNTIME_IMAGE="${{ secrets.AZURE_ACR_HOSTNAME }}/ai-dynamo/dynamo:${{ github.sha }}-${FRAMEWORK}-amd64" - # export KUBE_NS=$NAMESPACE - # export GRAPH_NAME=$(yq e '.metadata.name' $DEPLOYMENT_FILE) - # # Update the deployment file in-place - # yq -i '.spec.services.[].extraPodSpec.mainContainer.image = env(FRAMEWORK_RUNTIME_IMAGE)' $DEPLOYMENT_FILE - - # # Debug: Show updated deployment file - # echo "=== UPDATED DEPLOYMENT FILE ===" - # cat $DEPLOYMENT_FILE - - # # Apply the updated file - # kubectl apply -n $KUBE_NS -f $DEPLOYMENT_FILE - - # # --- Wait for all pods in the dynamo graph deployment to be ready --- - # sleep 20 - # # Get the deployment name from the file - # export GRAPH_NAME=$(yq e '.metadata.name' $DEPLOYMENT_FILE) - # echo "Waiting for all pods with label nvidia.com/dynamo-graph-deployment-name: $GRAPH_NAME" - # # Wait for all pods with the deployment label to be ready - # kubectl wait --for=condition=ready pod -l "nvidia.com/dynamo-graph-deployment-name=$GRAPH_NAME" -n ${KUBE_NS} --timeout=1000s - - # # Debug: Show final pod statuses for the deployment - # echo "=== FINAL POD STATUSES ===" - # kubectl get pods -l "nvidia.com/dynamo-graph-deployment-name=$GRAPH_NAME" -n $KUBE_NS -o wide - # echo "" - - # kubectl get all -n $KUBE_NS - # export FRONTEND_POD=$(kubectl get pods -n ${KUBE_NS} | grep "frontend" | sort -k1 | tail -n1 | awk '{print $1}') - # export CONTAINER_PORT=$(kubectl get pod $FRONTEND_POD -n ${KUBE_NS} -o jsonpath='{.spec.containers[0].ports[?(@.name=="http")].containerPort}') - # echo "Container port is ${CONTAINER_PORT}" - # kubectl port-forward pod/$FRONTEND_POD 8000:${CONTAINER_PORT} -n ${KUBE_NS} & - # export LLM_URL="http://localhost:8000" - # sleep 10 # Give port-forward time to establish the connection - # echo "LLM URL: ${LLM_URL}" - # echo "MODEL NAME: ${MODEL_NAME}" - # # Wait until the model is available in the /v1/models response - # MAX_ATTEMPTS=30 - # ATTEMPT=1 - # while [ $ATTEMPT -le $MAX_ATTEMPTS ]; do - # MODELS_RESPONSE=$(curl -s --retry 5 --retry-delay 2 --retry-connrefused "${LLM_URL}/v1/models") - # if echo "$MODELS_RESPONSE" | jq -e --arg MODEL_NAME "$MODEL_NAME" '.data[]?.id == $MODEL_NAME' >/dev/null 2>&1; then - # echo "Model $MODEL_NAME is available in /v1/models" - # break - # fi - # echo "Waiting for model $MODEL_NAME to be available in /v1/models... (attempt $ATTEMPT/$MAX_ATTEMPTS)" - # sleep 5 - # ATTEMPT=$((ATTEMPT + 1)) - # done - # if [ $ATTEMPT -gt $MAX_ATTEMPTS ]; then - # echo "Model $MODEL_NAME not found in /v1/models after $MAX_ATTEMPTS attempts" - # echo "Last response: $MODELS_RESPONSE" - # exit 1 - # fi - # RESPONSE=$(curl -s -N --no-buffer --retry 10 --retry-delay 5 --retry-connrefused -X POST "${LLM_URL}/v1/chat/completions" \ - # -H 'accept: text/event-stream' \ - # -H 'Content-Type: application/json' \ - # -d '{ - # "model": "'"${MODEL_NAME:-Qwen/Qwen3-0.6B}"'", - # "messages": [ - # { - # "role": "user", - # "content": "In the heart of Eldoria, an ancient land of boundless magic and mysterious creatures, lies the long-forgotten city of Aeloria. Once a beacon of knowledge and power, Aeloria was buried beneath the shifting sands of time, lost to the world for centuries. You are an intrepid explorer, known for your unparalleled curiosity and courage, who has stumbled upon an ancient map hinting at ests that Aeloria holds a secret so profound that it has the potential to reshape the very fabric of reality. Your journey will take you through treacherous deserts, enchanted forests, and across perilous mountain ranges. Your Task: Character Background: Develop a detailed background for your character. Describe their motivations for seeking out Aeloria, their skills and weaknesses, and any personal connections to the ancient city or its legends. Are they driven by a quest for knowledge, a search for lost familt clue is hidden." - # } - # ], - # "stream":false, - # "max_tokens": 30, - # "temperature": 0.0 - # }' 2>&1) - # echo "Response: $RESPONSE" - # TEST_RESULT=0 - # if ! echo "$RESPONSE" | jq -e . >/dev/null 2>&1; then - # echo "Test failed: Response is not valid JSON" - # echo "Got: $RESPONSE" - # TEST_RESULT=1 - # elif ! echo "$RESPONSE" | jq -e '.choices[0].message.role == "assistant"' >/dev/null 2>&1; then - # echo "Test failed: Message role is not 'assistant'" - # echo "Got: $(echo "$RESPONSE" | jq '.choices[0].message.role')" - # TEST_RESULT=1 - # elif ! echo "$RESPONSE" | jq -e '.model == "'"${MODEL_NAME}"'"' >/dev/null 2>&1; then - # echo "Test failed: Model name is incorrect" - # echo "Got: $(echo "$RESPONSE" | jq '.model')" - # TEST_RESULT=1 - # elif ! echo "$RESPONSE" | jq -e '.choices[0].message.content | length > 100' >/dev/null 2>&1; then - # echo "Test failed: Response content length is not greater than 100 characters" - # echo "Got length: $(echo "$RESPONSE" | jq '.choices[0].message.content | length')" - # TEST_RESULT=1 - # else - # echo "Test passed: Response matches expected format and content" - # fi - # exit $TEST_RESULT - # - name: Cleanup - # if: always() - # timeout-minutes: 5 - # run: | - # echo "${{ secrets.AZURE_AKS_CI_KUBECONFIG_B64 }}" | base64 -d > .kubeconfig - # chmod 600 .kubeconfig - # export KUBECONFIG=$(pwd)/.kubeconfig - # kubectl config set-context --current --namespace=$NAMESPACE --kubeconfig "${KUBECONFIG}" - - # # For debugging purposes, list all the resources before we uninstall - # kubectl get all - - # echo "Deleting all DynamoGraphDeployments in namespace $NAMESPACE..." - # kubectl delete dynamographdeployments --all -n $NAMESPACE || true - - # # Uninstall the helm chart - # helm ls - # helm uninstall dynamo-platform || true - - # echo "Namespace $NAMESPACE deletion initiated, proceeding with cleanup..." - # kubectl delete namespace $NAMESPACE || true - # echo "Namespace $NAMESPACE completed." - - # deploy-test-sglang: - # runs-on: cpu-amd-m5-2xlarge - # if: needs.changed-files.outputs.has_code_changes == 'true' - # needs: [changed-files, operator, sglang] - # permissions: - # contents: read - # strategy: - # fail-fast: false - # matrix: - # profile: - # - agg - # - agg_router - # name: deploy-test-sglang (${{ matrix.profile }}) - # env: - # FRAMEWORK: sglang - # DYNAMO_INGRESS_SUFFIX: dev.aire.nvidia.com - # DEPLOYMENT_FILE: "deploy/${{ matrix.profile }}.yaml" - # MODEL_NAME: "Qwen/Qwen3-0.6B" - # steps: *deploy-test-steps - - # deploy-test-trtllm: - # runs-on: cpu-amd-m5-2xlarge - # if: needs.changed-files.outputs.has_code_changes == 'true' - # needs: [changed-files, operator, trtllm] - # permissions: - # contents: read - # strategy: - # fail-fast: false - # matrix: - # profile: - # - agg - # - agg_router - # - disagg - # - disagg_router - # name: deploy-test-trtllm (${{ matrix.profile }}) - # env: - # FRAMEWORK: trtllm - # DYNAMO_INGRESS_SUFFIX: dev.aire.nvidia.com - # DEPLOYMENT_FILE: "deploy/${{ matrix.profile }}.yaml" - # MODEL_NAME: "Qwen/Qwen3-0.6B" - # steps: *deploy-test-steps + deploy-test-vllm: + runs-on: cpu-amd-m5-2xlarge + if: needs.changed-files.outputs.has_code_changes == 'true' + needs: [changed-files, operator, vllm] + permissions: + contents: read + strategy: + fail-fast: false + matrix: + profile: + - agg + - agg_router + - disagg + - disagg_router + name: deploy-test-vllm (${{ matrix.profile }}) + env: + FRAMEWORK: vllm + DYNAMO_INGRESS_SUFFIX: dev.aire.nvidia.com + DEPLOYMENT_FILE: "deploy/${{ matrix.profile }}.yaml" + MODEL_NAME: "Qwen/Qwen3-0.6B" + steps: &deploy-test-steps + - uses: actions/checkout@v4 + - name: Set namespace and install dependencies + run: | + # Set namespace using FRAMEWORK env var + PROFILE_SANITIZED="${{ matrix.profile }}" + PROFILE_SANITIZED="${PROFILE_SANITIZED//_/-}" + echo "NAMESPACE=gh-job-id-${{ github.run_id }}-${FRAMEWORK}-${PROFILE_SANITIZED}" >> $GITHUB_ENV + + set -x + # Install dependencies + sudo apt-get update && sudo apt-get install -y curl bash openssl gettext git jq + + # Install yq + echo "Installing yq..." + curl -L https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o yq + sudo chmod 755 yq + sudo mv yq /usr/local/bin/ + # Install Helm + echo "Installing Helm..." + curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 + sudo chmod 700 get_helm.sh + sudo ./get_helm.sh + # Install kubectl + curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" + sudo chmod 755 kubectl + sudo mv kubectl /usr/local/bin/ + + # Setup kubeconfig + echo "${{ secrets.AZURE_AKS_CI_KUBECONFIG_B64 }}" | base64 -d > .kubeconfig + chmod 600 .kubeconfig + export KUBECONFIG=$(pwd)/.kubeconfig + kubectl config set-context --current --namespace=$NAMESPACE --kubeconfig "${KUBECONFIG}" + kubectl config current-context + - name: Deploy Operator + run: | + set -x + export KUBECONFIG=$(pwd)/.kubeconfig + + # Create a namespace for this job + echo "Creating an ephemeral namespace..." + kubectl delete namespace $NAMESPACE || true + kubectl create namespace $NAMESPACE || true + echo "Attaching the labels for secrets and cleanup" + kubectl label namespaces ${NAMESPACE} nscleanup/enabled=true nscleanup/ttl=7200 gitlab-imagepull=enabled ngc-api=enabled nvcr-imagepull=enabled --overwrite=true + + # Set the namespace as default + kubectl config set-context --current --namespace=$NAMESPACE + + # Check if Istio is installed + kubectl get pods -n istio-system + # Check if default storage class exists + kubectl get storageclass + + # Install Helm chart + export IMAGE_TAG=$(cat build.env) + echo $IMAGE_TAG + export VIRTUAL_ENV=/opt/dynamo/venv + export KUBE_NS=$NAMESPACE + export ISTIO_ENABLED=true + export ISTIO_GATEWAY=istio-system/ingress-alb + export VIRTUAL_SERVICE_SUPPORTS_HTTPS=true + export DYNAMO_CLOUD=https://${NAMESPACE}.${DYNAMO_INGRESS_SUFFIX} + + # Install dynamo env secrets + kubectl create secret generic hf-token-secret --from-literal=HF_TOKEN=${{ secrets.HF_TOKEN }} -n $KUBE_NS || true + # Create docker pull secret for operator image + kubectl create secret docker-registry docker-imagepullsecret --docker-server=${{ secrets.AZURE_ACR_HOSTNAME }} --docker-username=${{ secrets.AZURE_ACR_USER }} --docker-password=${{ secrets.AZURE_ACR_PASSWORD }} --namespace=${NAMESPACE} + # Install helm dependencies + helm repo add bitnami https://charts.bitnami.com/bitnami + cd deploy/cloud/helm/platform/ + helm dep build . + # Install platform with namespace restriction for single profile testing + helm upgrade --install dynamo-platform . --namespace ${NAMESPACE} \ + --set dynamo-operator.namespaceRestriction.enabled=true \ + --set dynamo-operator.namespaceRestriction.allowedNamespaces[0]=${NAMESPACE} \ + --set dynamo-operator.controllerManager.manager.image.repository=${{ secrets.AZURE_ACR_HOSTNAME }}/ai-dynamo/dynamo \ + --set dynamo-operator.controllerManager.manager.image.tag=${{ github.sha }}-operator-amd64 \ + --set dynamo-operator.imagePullSecrets[0].name=docker-imagepullsecret \ + --set global.security.allowInsecureImages=true \ + --set nats.container.image.registry=${{ secrets.AZURE_ACR_HOSTNAME }}/dockerhub \ + --set nats.reloader.image.registry=${{ secrets.AZURE_ACR_HOSTNAME }}/dockerhub \ + --set etcd.image.registry=${{ secrets.AZURE_ACR_HOSTNAME }}/dockerhub \ + --set dynamo-operator.dynamo.internalImages.debugger=${{ secrets.AZURE_ACR_HOSTNAME }}/dockerhub/python:3.12-slim \ + --set dynamo-operator.dynamo.mpiRun.sshKeygen.images.keygen=${{ secrets.AZURE_ACR_HOSTNAME }}/dockerhub/bitnamisecure/git:latest \ + --set dynamo-operator.dynamo.mpiRun.sshKeygen.images.kubectl=${{ secrets.AZURE_ACR_HOSTNAME }}/dockerhub/bitnamisecure/kubectl:latest + # Wait for all deployments to be ready + timeout 300s kubectl rollout status deployment -n $NAMESPACE --watch + cd - + + export KUBECONFIG=$(pwd)/.kubeconfig + kubectl config set-context --current --namespace=$NAMESPACE + + cd components/backends/$FRAMEWORK + export FRAMEWORK_RUNTIME_IMAGE="${{ secrets.AZURE_ACR_HOSTNAME }}/ai-dynamo/dynamo:${{ github.sha }}-${FRAMEWORK}-amd64" + export KUBE_NS=$NAMESPACE + export GRAPH_NAME=$(yq e '.metadata.name' $DEPLOYMENT_FILE) + # Update the deployment file in-place + yq -i '.spec.services.[].extraPodSpec.mainContainer.image = env(FRAMEWORK_RUNTIME_IMAGE)' $DEPLOYMENT_FILE + + # Debug: Show updated deployment file + echo "=== UPDATED DEPLOYMENT FILE ===" + cat $DEPLOYMENT_FILE + + # Apply the updated file + kubectl apply -n $KUBE_NS -f $DEPLOYMENT_FILE + + # --- Wait for all pods in the dynamo graph deployment to be ready --- + sleep 20 + # Get the deployment name from the file + export GRAPH_NAME=$(yq e '.metadata.name' $DEPLOYMENT_FILE) + echo "Waiting for all pods with label nvidia.com/dynamo-graph-deployment-name: $GRAPH_NAME" + # Wait for all pods with the deployment label to be ready + kubectl wait --for=condition=ready pod -l "nvidia.com/dynamo-graph-deployment-name=$GRAPH_NAME" -n ${KUBE_NS} --timeout=1000s + + # Debug: Show final pod statuses for the deployment + echo "=== FINAL POD STATUSES ===" + kubectl get pods -l "nvidia.com/dynamo-graph-deployment-name=$GRAPH_NAME" -n $KUBE_NS -o wide + echo "" + + kubectl get all -n $KUBE_NS + export FRONTEND_POD=$(kubectl get pods -n ${KUBE_NS} | grep "frontend" | sort -k1 | tail -n1 | awk '{print $1}') + export CONTAINER_PORT=$(kubectl get pod $FRONTEND_POD -n ${KUBE_NS} -o jsonpath='{.spec.containers[0].ports[?(@.name=="http")].containerPort}') + echo "Container port is ${CONTAINER_PORT}" + kubectl port-forward pod/$FRONTEND_POD 8000:${CONTAINER_PORT} -n ${KUBE_NS} & + export LLM_URL="http://localhost:8000" + sleep 10 # Give port-forward time to establish the connection + echo "LLM URL: ${LLM_URL}" + echo "MODEL NAME: ${MODEL_NAME}" + # Wait until the model is available in the /v1/models response + MAX_ATTEMPTS=30 + ATTEMPT=1 + while [ $ATTEMPT -le $MAX_ATTEMPTS ]; do + MODELS_RESPONSE=$(curl -s --retry 5 --retry-delay 2 --retry-connrefused "${LLM_URL}/v1/models") + if echo "$MODELS_RESPONSE" | jq -e --arg MODEL_NAME "$MODEL_NAME" '.data[]?.id == $MODEL_NAME' >/dev/null 2>&1; then + echo "Model $MODEL_NAME is available in /v1/models" + break + fi + echo "Waiting for model $MODEL_NAME to be available in /v1/models... (attempt $ATTEMPT/$MAX_ATTEMPTS)" + sleep 5 + ATTEMPT=$((ATTEMPT + 1)) + done + if [ $ATTEMPT -gt $MAX_ATTEMPTS ]; then + echo "Model $MODEL_NAME not found in /v1/models after $MAX_ATTEMPTS attempts" + echo "Last response: $MODELS_RESPONSE" + exit 1 + fi + RESPONSE=$(curl -s -N --no-buffer --retry 10 --retry-delay 5 --retry-connrefused -X POST "${LLM_URL}/v1/chat/completions" \ + -H 'accept: text/event-stream' \ + -H 'Content-Type: application/json' \ + -d '{ + "model": "'"${MODEL_NAME:-Qwen/Qwen3-0.6B}"'", + "messages": [ + { + "role": "user", + "content": "In the heart of Eldoria, an ancient land of boundless magic and mysterious creatures, lies the long-forgotten city of Aeloria. Once a beacon of knowledge and power, Aeloria was buried beneath the shifting sands of time, lost to the world for centuries. You are an intrepid explorer, known for your unparalleled curiosity and courage, who has stumbled upon an ancient map hinting at ests that Aeloria holds a secret so profound that it has the potential to reshape the very fabric of reality. Your journey will take you through treacherous deserts, enchanted forests, and across perilous mountain ranges. Your Task: Character Background: Develop a detailed background for your character. Describe their motivations for seeking out Aeloria, their skills and weaknesses, and any personal connections to the ancient city or its legends. Are they driven by a quest for knowledge, a search for lost familt clue is hidden." + } + ], + "stream":false, + "max_tokens": 30, + "temperature": 0.0 + }' 2>&1) + echo "Response: $RESPONSE" + TEST_RESULT=0 + if ! echo "$RESPONSE" | jq -e . >/dev/null 2>&1; then + echo "Test failed: Response is not valid JSON" + echo "Got: $RESPONSE" + TEST_RESULT=1 + elif ! echo "$RESPONSE" | jq -e '.choices[0].message.role == "assistant"' >/dev/null 2>&1; then + echo "Test failed: Message role is not 'assistant'" + echo "Got: $(echo "$RESPONSE" | jq '.choices[0].message.role')" + TEST_RESULT=1 + elif ! echo "$RESPONSE" | jq -e '.model == "'"${MODEL_NAME}"'"' >/dev/null 2>&1; then + echo "Test failed: Model name is incorrect" + echo "Got: $(echo "$RESPONSE" | jq '.model')" + TEST_RESULT=1 + elif ! echo "$RESPONSE" | jq -e '.choices[0].message.content | length > 100' >/dev/null 2>&1; then + echo "Test failed: Response content length is not greater than 100 characters" + echo "Got length: $(echo "$RESPONSE" | jq '.choices[0].message.content | length')" + TEST_RESULT=1 + else + echo "Test passed: Response matches expected format and content" + fi + exit $TEST_RESULT + - name: Cleanup + if: always() + timeout-minutes: 5 + run: | + echo "${{ secrets.AZURE_AKS_CI_KUBECONFIG_B64 }}" | base64 -d > .kubeconfig + chmod 600 .kubeconfig + export KUBECONFIG=$(pwd)/.kubeconfig + kubectl config set-context --current --namespace=$NAMESPACE --kubeconfig "${KUBECONFIG}" + + # For debugging purposes, list all the resources before we uninstall + kubectl get all + + echo "Deleting all DynamoGraphDeployments in namespace $NAMESPACE..." + kubectl delete dynamographdeployments --all -n $NAMESPACE || true + + # Uninstall the helm chart + helm ls + helm uninstall dynamo-platform || true + + echo "Namespace $NAMESPACE deletion initiated, proceeding with cleanup..." + kubectl delete namespace $NAMESPACE || true + echo "Namespace $NAMESPACE completed." + + deploy-test-sglang: + runs-on: cpu-amd-m5-2xlarge + if: needs.changed-files.outputs.has_code_changes == 'true' + needs: [changed-files, operator, sglang] + permissions: + contents: read + strategy: + fail-fast: false + matrix: + profile: + - agg + - agg_router + name: deploy-test-sglang (${{ matrix.profile }}) + env: + FRAMEWORK: sglang + DYNAMO_INGRESS_SUFFIX: dev.aire.nvidia.com + DEPLOYMENT_FILE: "deploy/${{ matrix.profile }}.yaml" + MODEL_NAME: "Qwen/Qwen3-0.6B" + steps: *deploy-test-steps + + deploy-test-trtllm: + runs-on: cpu-amd-m5-2xlarge + if: needs.changed-files.outputs.has_code_changes == 'true' + needs: [changed-files, operator, trtllm] + permissions: + contents: read + strategy: + fail-fast: false + matrix: + profile: + - agg + - agg_router + - disagg + - disagg_router + name: deploy-test-trtllm (${{ matrix.profile }}) + env: + FRAMEWORK: trtllm + DYNAMO_INGRESS_SUFFIX: dev.aire.nvidia.com + DEPLOYMENT_FILE: "deploy/${{ matrix.profile }}.yaml" + MODEL_NAME: "Qwen/Qwen3-0.6B" + steps: *deploy-test-steps diff --git a/deploy/cloud/helm/platform/components/operator/templates/mpi-run-ssh-keygen-job.yaml b/deploy/cloud/helm/platform/components/operator/templates/mpi-run-ssh-keygen-job.yaml index b7fec561ab..98b28a0241 100644 --- a/deploy/cloud/helm/platform/components/operator/templates/mpi-run-ssh-keygen-job.yaml +++ b/deploy/cloud/helm/platform/components/operator/templates/mpi-run-ssh-keygen-job.yaml @@ -48,7 +48,7 @@ spec: fsGroup: 65534 initContainers: - name: keygen - image: bitnamisecure/git:latest + image: {{ .Values.dynamo.mpiRun.sshKeygen.images.keygen }} volumeMounts: - name: shared mountPath: /shared @@ -67,7 +67,7 @@ spec: echo "SSH keys generated and saved to shared volume" containers: - name: kubectl-create-secret - image: bitnamisecure/kubectl:latest + image: {{ .Values.dynamo.mpiRun.sshKeygen.images.kubectl }} volumeMounts: - name: shared mountPath: /shared diff --git a/deploy/cloud/helm/platform/components/operator/values.yaml b/deploy/cloud/helm/platform/components/operator/values.yaml index 2d8be082f4..8ba3b7ecba 100644 --- a/deploy/cloud/helm/platform/components/operator/values.yaml +++ b/deploy/cloud/helm/platform/components/operator/values.yaml @@ -116,6 +116,9 @@ dynamo: secretName: "mpi-run-ssh-secret" sshKeygen: enabled: true + images: + keygen: bitnamisecure/git:latest + kubectl: bitnamisecure/kubectl:latest # DynamoGraphDeploymentRequest (DGDR) configuration dgdr: