| 1 | group: Abuild |
| 2 | steps: |
| 3 | - label: ":docker: Build image" |
| 4 | key: image-build |
| 5 | depends_on: [] |
| 6 | timeout_in_minutes: 600 |
| 7 | commands: |
| 8 | - if [[ "$BUILDKITE_BRANCH" == "main" ]]; then .buildkite/image_build/image_build.sh $REGISTRY $REPO $BUILDKITE_COMMIT $BRANCH $IMAGE_TAG $IMAGE_TAG_LATEST; else .buildkite/image_build/image_build.sh $REGISTRY $REPO $BUILDKITE_COMMIT $BRANCH $IMAGE_TAG; fi |
| 9 | retry: |
| 10 | automatic: |
| 11 | - exit_status: -1 # Agent was lost |
| 12 | limit: 2 |
| 13 | - exit_status: -10 # Agent was lost |
| 14 | limit: 2 |
| 15 | |
| 16 | - label: ":docker: :smoking: Non-root smoke tests" |
| 17 | key: image-build-smoke-test |
| 18 | depends_on: |
| 19 | - image-build |
| 20 | commands: |
| 21 | # Smoke 1: the default (root) image must still be importable |
| 22 | # under a non-root UID via `--user 2000:0`. Validates the `vllm` passwd |
| 23 | # entry + group-0-writable /home/vllm + uv path cleanup from #31959. |
| 24 | # Uses `import vllm` rather than `vllm serve --help` because the latter |
| 25 | # instantiates `VllmConfig` which requires a GPU attached to the |
| 26 | # container. |
| 27 | - docker run --rm --user 2000:0 --entrypoint python3 "$IMAGE_TAG" -c "import vllm; print(vllm.__version__)" |
| 28 | # Smoke 2: assert the non-root enabling invariants are baked |
| 29 | # into the image. Runs as UID 2000:0 via a shell so we can verify |
| 30 | # filesystem perms + passwd/group file state + wrapper presence without |
| 31 | # triggering vLLM's GPU-requiring config-init path. The opt-in |
| 32 | # `vllm-openai-nonroot` target adds only `USER vllm`, `WORKDIR |
| 33 | # /home/vllm`, and an `ENTRYPOINT` override on top of these invariants; |
| 34 | # its build correctness is reviewed at the Dockerfile level. Wrapper |
| 35 | # logic is covered separately by the pre-commit hook |
| 36 | # `test-nonroot-entrypoint` (see .pre-commit-config.yaml). |
| 37 | - | |
| 38 | docker run --rm --user 2000:0 --entrypoint /bin/sh "$IMAGE_TAG" -ec ' |
| 39 | if ! getent passwd 2000 | grep -q ^vllm:; then |
| 40 | echo FAIL: UID 2000 != vllm |
| 41 | exit 1 |
| 42 | fi |
| 43 | if ! id -gn 2>/dev/null | grep -qx root; then |
| 44 | echo FAIL: GID 0 not root group |
| 45 | exit 1 |
| 46 | fi |
| 47 | touch /home/vllm/.smoke && rm /home/vllm/.smoke |
| 48 | touch /opt/uv/cache/.smoke && rm /opt/uv/cache/.smoke |
| 49 | if ! test -x /usr/local/bin/vllm-nonroot-entrypoint.sh; then |
| 50 | echo FAIL: wrapper missing |
| 51 | exit 1 |
| 52 | fi |
| 53 | if ! test -w /etc/passwd; then |
| 54 | echo FAIL: /etc/passwd not group-writable |
| 55 | exit 1 |
| 56 | fi |
| 57 | if ! test -w /etc/group; then |
| 58 | echo FAIL: /etc/group not group-writable |
| 59 | exit 1 |
| 60 | fi |
| 61 | echo non-root invariants OK |
| 62 | ' |
| 63 | retry: |
| 64 | automatic: |
| 65 | - exit_status: -1 # Agent was lost |
| 66 | limit: 2 |
| 67 | - exit_status: -10 # Agent was lost |
| 68 | limit: 2 |
| 69 | |
| 70 | - label: ":docker: Build CPU image" |
| 71 | key: image-build-cpu |
| 72 | depends_on: [] |
| 73 | commands: |
| 74 | - .buildkite/image_build/image_build_cpu.sh $REGISTRY $REPO $BUILDKITE_COMMIT |
| 75 | env: |
| 76 | DOCKER_BUILDKIT: "1" |
| 77 | retry: |
| 78 | automatic: |
| 79 | - exit_status: -1 # Agent was lost |
| 80 | limit: 2 |
| 81 | - exit_status: -10 # Agent was lost |
| 82 | limit: 2 |
| 83 | |
| 84 | - label: ":docker: Build HPU image" |
| 85 | soft_fail: true |
| 86 | depends_on: [] |
| 87 | key: image-build-hpu |
| 88 | commands: |
| 89 | - .buildkite/image_build/image_build_hpu.sh $REGISTRY $REPO $BUILDKITE_COMMIT |
| 90 | env: |
| 91 | DOCKER_BUILDKIT: "1" |
| 92 | retry: |
| 93 | automatic: |
| 94 | - exit_status: -1 # Agent was lost |
| 95 | limit: 2 |
| 96 | - exit_status: -10 # Agent was lost |
| 97 | limit: 2 |
| 98 | |
| 99 | - label: ":docker: Build CPU arm64 image" |
| 100 | key: cpu-arm64-image-build |
| 101 | depends_on: [] |
| 102 | optional: true |
| 103 | commands: |
| 104 | - .buildkite/image_build/image_build_cpu_arm64.sh $REGISTRY $REPO $BUILDKITE_COMMIT |
| 105 | env: |
| 106 | DOCKER_BUILDKIT: "1" |
| 107 | retry: |
| 108 | automatic: |
| 109 | - exit_status: -1 # Agent was lost |
| 110 | limit: 2 |
| 111 | - exit_status: -10 # Agent was lost |
| 112 | limit: 2 |
| 113 | |
| 114 | - label: ":docker: Build arm64 image" |
| 115 | key: arm64-image-build |
| 116 | depends_on: [] |
| 117 | source_file_dependencies: |
| 118 | - ".buildkite/image_build/image_build.yaml" |
| 119 | - ".buildkite/image_build/image_build_arm64.sh" |
| 120 | - "docker/Dockerfile" |
| 121 | commands: |
| 122 | - .buildkite/image_build/image_build_arm64.sh $REGISTRY $REPO $BUILDKITE_COMMIT |
| 123 | env: |
| 124 | DOCKER_BUILDKIT: "1" |
| 125 | retry: |
| 126 | automatic: |
| 127 | - exit_status: -1 # Agent was lost |
| 128 | limit: 2 |
| 129 | - exit_status: -10 # Agent was lost |
| 130 | limit: 2 |