diff --git a/.buildkite/pipeline-npu.yaml b/.buildkite/pipeline-npu.yaml index fd9a2c392..4f36272f6 100644 --- a/.buildkite/pipeline-npu.yaml +++ b/.buildkite/pipeline-npu.yaml @@ -2,45 +2,36 @@ # This pipeline is for running NPU tests on PRs . steps: - - group: ":card_index_dividers: npu test" - key: npu-test-steps - steps: - - label: ":pytest: NPU tests" - key: npu-tests - agents: - queue: "linux-small" - plugins: - - kubernetes: - podSpec: - containers: - - image: "quay.io/ascend/vime:vime-latest" - volumeMounts: - - name: devshm - mountPath: /dev/shm - - name: hf-cache - mountPath: /root/.cache/huggingface - env: - - name: HF_HOME - value: /root/.cache/huggingface - - name: VIME_TEST_ENABLE_INFINITE_RUN - value: "false" - # Expand additional pod_env variables here as needed, e.g.: - # - name: VIME_TEST_USE_DEEPEP - # value: "0" - volumes: - - name: devshm - emptyDir: - medium: Memory - - name: hf-cache - hostPath: - path: /mnt/hf-cache - type: DirectoryOrCreate - timeout_in_minutes: 60 - # The npu test cases to be executed have not been determined yet. - command: | - set -euo pipefail - PR="${BUILDKITE_PULL_REQUEST:-false}" - [ "$PR" = "false" ] && PR="non-pr" - export GITHUB_COMMIT_NAME="${BUILDKITE_COMMIT}_${PR}" - pip install -e . --no-deps --break-system-packages - python -c "print('test-npu')" + - label: "Run NPU test via Docker" + key: npu-tests + agents: + queue: "ascend-a3" + timeout_in_minutes: 60 + command: | + set -euo pipefail + docker info || (echo "Docker not running" && exit 1) + mkdir -p /mnt/hf-cache + docker run --rm \ + --name "vime-test-${BUILDKITE_BUILD_NUMBER}" \ + --device /dev/davinci_manager \ + --device /dev/devmm_svm \ + --device /dev/hisi_hdc \ + -v /usr/local/dcmi:/usr/local/dcmi \ + -v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \ + -v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \ + -v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \ + -v /etc/ascend_install.info:/etc/ascend_install.info \ + -v /dev/shm:/dev/shm \ + -v /mnt/hf-cache:/root/.cache/huggingface \ + -e HF_HOME=/root/.cache/huggingface \ + -e VIME_TEST_ENABLE_INFINITE_RUN=false \ + -e BUILDKITE_PULL_REQUEST="${BUILDKITE_PULL_REQUEST:-false}" \ + -e BUILDKITE_COMMIT="${BUILDKITE_COMMIT}" \ + -e GITHUB_COMMIT_NAME="${BUILDKITE_COMMIT}_${BUILDKITE_PULL_REQUEST:-non-pr}" \ + --network host \ + quay.io/ascend/vime:vime-latest \ + bash -c " + set -euo pipefail + pip install -e . --no-deps --break-system-packages || pip install -e . --no-deps + python -c \"print('test-npu')\" + "