Skip to content

Commit 02dbf30

Browse files
authored
[Build] skip renaming files for release wheels pipeline (#9671)
Signed-off-by: simon-mo <[email protected]>
1 parent 2ac6d0e commit 02dbf30

File tree

2 files changed

+46
-13
lines changed

2 files changed

+46
-13
lines changed

.buildkite/release-pipeline.yaml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,23 @@ steps:
66
- "DOCKER_BUILDKIT=1 docker build --build-arg max_jobs=16 --build-arg USE_SCCACHE=1 --build-arg GIT_REPO_CHECK=1 --build-arg CUDA_VERSION=12.1.0 --tag vllm-ci:build-image --target build --progress plain ."
77
- "mkdir artifacts"
88
- "docker run --rm -v $(pwd)/artifacts:/artifacts_host vllm-ci:build-image bash -c 'cp -r dist /artifacts_host && chmod -R a+rw /artifacts_host'"
9-
# rename the files to change linux -> manylinux1
10-
- "for f in artifacts/dist/*.whl; do mv -- \"$$f\" \"$${f/linux/manylinux1}\"; done"
11-
- "mv artifacts/dist/$(ls artifacts/dist) artifacts/dist/vllm-1.0.0.dev-cp38-abi3-manylinux1_x86_64.whl"
12-
- "aws s3 cp artifacts/dist/vllm-1.0.0.dev-cp38-abi3-manylinux1_x86_64.whl s3://vllm-wheels/$BUILDKITE_COMMIT/vllm-1.0.0.dev-cp38-abi3-manylinux1_x86_64.whl"
13-
- "aws s3 cp artifacts/dist/vllm-1.0.0.dev-cp38-abi3-manylinux1_x86_64.whl s3://vllm-wheels/nightly/vllm-1.0.0.dev-cp38-abi3-manylinux1_x86_64.whl"
9+
- "bash .buildkite/upload-wheels.sh"
1410
env:
1511
DOCKER_BUILDKIT: "1"
1612

17-
- block: "Build CUDA 11.8 wheel"
18-
key: block-build-cu118-wheel
19-
13+
# Note(simon): We can always build CUDA 11.8 wheel to ensure the build is working.
14+
# However, this block can be uncommented to save some compute hours.
15+
# - block: "Build CUDA 11.8 wheel"
16+
# key: block-build-cu118-wheel
17+
2018
- label: "Build wheel - CUDA 11.8"
21-
depends_on: block-build-cu118-wheel
19+
# depends_on: block-build-cu118-wheel
2220
agents:
2321
queue: cpu_queue
2422
commands:
2523
- "DOCKER_BUILDKIT=1 docker build --build-arg max_jobs=16 --build-arg USE_SCCACHE=1 --build-arg GIT_REPO_CHECK=1 --build-arg CUDA_VERSION=11.8.0 --tag vllm-ci:build-image --target build --progress plain ."
2624
- "mkdir artifacts"
2725
- "docker run --rm -v $(pwd)/artifacts:/artifacts_host vllm-ci:build-image bash -c 'cp -r dist /artifacts_host && chmod -R a+rw /artifacts_host'"
28-
# rename the files to change linux -> manylinux1
29-
- "for f in artifacts/dist/*.whl; do mv -- \"$$f\" \"$${f/linux/manylinux1}\"; done"
30-
- "aws s3 cp --recursive artifacts/dist s3://vllm-wheels/$BUILDKITE_COMMIT/"
31-
- "aws s3 cp --recursive artifacts/dist s3://vllm-wheels/nightly/"
26+
- "bash .buildkite/upload-wheels.sh"
3227
env:
3328
DOCKER_BUILDKIT: "1"

.buildkite/upload-wheels.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/usr/bin/env bash
2+
3+
set -ex
4+
5+
# Assume wheels are in artifacts/dist/*.whl
6+
wheel_files=(artifacts/dist/*.whl)
7+
8+
# Check that exactly one wheel is found
9+
if [[ ${#wheel_files[@]} -ne 1 ]]; then
10+
echo "Error: Expected exactly one wheel file in artifacts/dist/, but found ${#wheel_files[@]}"
11+
exit 1
12+
fi
13+
14+
# Get the single wheel file
15+
wheel="${wheel_files[0]}"
16+
17+
# Rename 'linux' to 'manylinux1' in the wheel filename
18+
new_wheel="${wheel/linux/manylinux1}"
19+
mv -- "$wheel" "$new_wheel"
20+
wheel="$new_wheel"
21+
22+
# Extract the version from the wheel
23+
version=$(unzip -p "$wheel" '**/METADATA' | grep '^Version: ' | cut -d' ' -f2)
24+
echo "Version: $version"
25+
26+
# If the version contains "dev", rename it to v1.0.0.dev for consistency
27+
if [[ $version == *dev* ]]; then
28+
new_version="1.0.0.dev"
29+
new_wheel="${wheel/$version/$new_version}"
30+
mv -- "$wheel" "$new_wheel"
31+
wheel="$new_wheel"
32+
version="$new_version"
33+
fi
34+
35+
# Upload the wheel to S3
36+
aws s3 cp "$wheel" "s3://vllm-wheels/$BUILDKITE_COMMIT/"
37+
aws s3 cp "$wheel" "s3://vllm-wheels/nightly/"
38+
aws s3 cp "$wheel" "s3://vllm-wheels/$version/"

0 commit comments

Comments
 (0)