From a754dc2cb964c78fd9da514aa0b87a0241e97d1f Mon Sep 17 00:00:00 2001 From: Robert Shaw <114415538+robertgshaw2-neuralmagic@users.noreply.github.com> Date: Sun, 14 Jul 2024 21:54:46 -0400 Subject: [PATCH] [CI/Build] Cross python wheel (#6394) --- .buildkite/release-pipeline.yaml | 38 ++------------------------------ Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 38 deletions(-) diff --git a/.buildkite/release-pipeline.yaml b/.buildkite/release-pipeline.yaml index 4a35ce92..4fa19511 100644 --- a/.buildkite/release-pipeline.yaml +++ b/.buildkite/release-pipeline.yaml @@ -1,51 +1,17 @@ steps: - - label: "Build wheel default - Python {{matrix.python_version}}, CUDA {{matrix.cuda_version}}" + - label: "Build wheel - CUDA {{matrix.cuda_version}}" agents: queue: cpu_queue commands: - - "DOCKER_BUILDKIT=1 docker build --build-arg max_jobs=16 --build-arg USE_SCCACHE=1 --build-arg CUDA_VERSION={{matrix.cuda_version}} --build-arg PYTHON_VERSION={{matrix.python_version}} --tag vllm-ci:build-image --target build --progress plain ." + - "DOCKER_BUILDKIT=1 docker build --build-arg max_jobs=16 --build-arg USE_SCCACHE=1 --build-arg CUDA_VERSION={{matrix.cuda_version}} --tag vllm-ci:build-image --target build --progress plain ." - "mkdir artifacts" - "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'" # rename the files to change linux -> manylinux1 - "for f in artifacts/dist/*.whl; do mv -- \"$$f\" \"$${f/linux/manylinux1}\"; done" - "aws s3 cp --recursive artifacts/dist s3://vllm-wheels/$BUILDKITE_COMMIT/" - "aws s3 cp --recursive artifacts/dist s3://vllm-wheels/nightly/" - matrix: - setup: - cuda_version: - - "12.1.0" - python_version: - - "3.10" - - "3.11" - - - block: "Build wheels full" - - - label: "Build wheel - Python {{matrix.python_version}}, CUDA {{matrix.cuda_version}}" - agents: - queue: cpu_queue - commands: - - "DOCKER_BUILDKIT=1 docker build --build-arg max_jobs=16 --build-arg USE_SCCACHE=1 --build-arg CUDA_VERSION={{matrix.cuda_version}} --build-arg PYTHON_VERSION={{matrix.python_version}} --tag vllm-ci:build-image --target build --progress plain ." - - "mkdir artifacts" - - "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'" - - "for f in artifacts/dist/*.whl; do mv -- \"$$f\" \"$${f/linux/manylinux1}\"; done" - - "aws s3 cp --recursive artifacts/dist s3://vllm-wheels/$BUILDKITE_COMMIT/" - - "aws s3 cp --recursive artifacts/dist s3://vllm-wheels/nightly/" matrix: setup: cuda_version: - "11.8.0" - "12.1.0" - python_version: - - "3.8" - - "3.9" - - "3.10" - - "3.11" - adjustments: - - with: - cuda_version: "12.1.0" - python_version: "3.10" - skip: true - - with: - cuda_version: "12.1.0" - python_version: "3.11" - skip: true diff --git a/Dockerfile b/Dockerfile index 9ed065de..7fbc168a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -104,7 +104,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \ && export SCCACHE_REGION=us-west-2 \ && export CMAKE_BUILD_TYPE=Release \ && sccache --show-stats \ - && python3 setup.py bdist_wheel --dist-dir=dist \ + && python3 setup.py bdist_wheel --dist-dir=dist --py-limited-api=cp38 \ && sccache --show-stats; \ fi @@ -112,7 +112,7 @@ ENV CCACHE_DIR=/root/.cache/ccache RUN --mount=type=cache,target=/root/.cache/ccache \ --mount=type=cache,target=/root/.cache/pip \ if [ "$USE_SCCACHE" != "1" ]; then \ - python3 setup.py bdist_wheel --dist-dir=dist; \ + python3 setup.py bdist_wheel --dist-dir=dist --py-limited-api=cp38; \ fi # check the size of the wheel, we cannot upload wheels larger than 100MB