[CI/Build] setuptools-scm fixes (#8900)
This commit is contained in:
parent
4141608c6a
commit
203ab8f80f
@ -3,7 +3,7 @@ steps:
|
|||||||
agents:
|
agents:
|
||||||
queue: cpu_queue
|
queue: cpu_queue
|
||||||
commands:
|
commands:
|
||||||
- "DOCKER_BUILDKIT=1 docker build --build-arg max_jobs=16 --build-arg buildkite_commit=$BUILDKITE_COMMIT --build-arg USE_SCCACHE=1 --build-arg CUDA_VERSION=12.1.0 --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=12.1.0 --tag vllm-ci:build-image --target build --progress plain ."
|
||||||
- "mkdir artifacts"
|
- "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'"
|
- "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
|
# rename the files to change linux -> manylinux1
|
||||||
@ -22,7 +22,7 @@ steps:
|
|||||||
agents:
|
agents:
|
||||||
queue: cpu_queue
|
queue: cpu_queue
|
||||||
commands:
|
commands:
|
||||||
- "DOCKER_BUILDKIT=1 docker build --build-arg max_jobs=16 --build-arg buildkite_commit=$BUILDKITE_COMMIT --build-arg USE_SCCACHE=1 --build-arg CUDA_VERSION=11.8.0 --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=11.8.0 --tag vllm-ci:build-image --target build --progress plain ."
|
||||||
- "mkdir artifacts"
|
- "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'"
|
- "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
|
# rename the files to change linux -> manylinux1
|
||||||
|
@ -2,5 +2,33 @@
|
|||||||
/.venv
|
/.venv
|
||||||
/build
|
/build
|
||||||
dist
|
dist
|
||||||
Dockerfile*
|
|
||||||
vllm/*.so
|
vllm/*.so
|
||||||
|
|
||||||
|
# Byte-compiled / optimized / DLL files
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
|
||||||
|
.mypy_cache
|
||||||
|
|
||||||
|
# Distribution / packaging
|
||||||
|
.Python
|
||||||
|
/build/
|
||||||
|
cmake-build-*/
|
||||||
|
CMakeUserPresets.json
|
||||||
|
develop-eggs/
|
||||||
|
/dist/
|
||||||
|
downloads/
|
||||||
|
eggs/
|
||||||
|
.eggs/
|
||||||
|
lib/
|
||||||
|
lib64/
|
||||||
|
parts/
|
||||||
|
sdist/
|
||||||
|
var/
|
||||||
|
wheels/
|
||||||
|
share/python-wheels/
|
||||||
|
*.egg-info/
|
||||||
|
.installed.cfg
|
||||||
|
*.egg
|
||||||
|
MANIFEST
|
||||||
|
3
.github/workflows/scripts/build.sh
vendored
3
.github/workflows/scripts/build.sh
vendored
@ -8,8 +8,7 @@ PATH=${cuda_home}/bin:$PATH
|
|||||||
LD_LIBRARY_PATH=${cuda_home}/lib64:$LD_LIBRARY_PATH
|
LD_LIBRARY_PATH=${cuda_home}/lib64:$LD_LIBRARY_PATH
|
||||||
|
|
||||||
# Install requirements
|
# Install requirements
|
||||||
$python_executable -m pip install wheel packaging 'setuptools-scm>=8'
|
$python_executable -m pip install -r requirements-build.txt -r requirements-cuda.txt
|
||||||
$python_executable -m pip install -r requirements-cuda.txt
|
|
||||||
|
|
||||||
# Limit the number of parallel jobs to avoid OOM
|
# Limit the number of parallel jobs to avoid OOM
|
||||||
export MAX_JOBS=1
|
export MAX_JOBS=1
|
||||||
|
10
Dockerfile
10
Dockerfile
@ -71,15 +71,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \
|
|||||||
python3 -m pip install -r requirements-build.txt
|
python3 -m pip install -r requirements-build.txt
|
||||||
|
|
||||||
# files and directories related to build wheels
|
# files and directories related to build wheels
|
||||||
COPY csrc csrc
|
COPY . .
|
||||||
COPY setup.py setup.py
|
|
||||||
COPY cmake cmake
|
|
||||||
COPY CMakeLists.txt CMakeLists.txt
|
|
||||||
COPY README.md README.md
|
|
||||||
COPY requirements-common.txt requirements-common.txt
|
|
||||||
COPY requirements-cuda.txt requirements-cuda.txt
|
|
||||||
COPY pyproject.toml pyproject.toml
|
|
||||||
COPY vllm vllm
|
|
||||||
|
|
||||||
# max jobs used by Ninja to build extensions
|
# max jobs used by Ninja to build extensions
|
||||||
ARG max_jobs=2
|
ARG max_jobs=2
|
||||||
|
@ -9,16 +9,7 @@ RUN apt-get update -y && \
|
|||||||
ffmpeg libsm6 libxext6 libgl1
|
ffmpeg libsm6 libxext6 libgl1
|
||||||
WORKDIR /workspace
|
WORKDIR /workspace
|
||||||
|
|
||||||
# copy requirements
|
COPY . .
|
||||||
COPY requirements-build.txt /workspace/vllm/
|
|
||||||
COPY requirements-common.txt /workspace/vllm/
|
|
||||||
COPY requirements-openvino.txt /workspace/vllm/
|
|
||||||
|
|
||||||
COPY vllm/ /workspace/vllm/vllm
|
|
||||||
COPY csrc/core /workspace/vllm/csrc/core
|
|
||||||
COPY cmake/utils.cmake /workspace/vllm/cmake/
|
|
||||||
COPY CMakeLists.txt /workspace/vllm/
|
|
||||||
COPY setup.py /workspace/vllm/
|
|
||||||
|
|
||||||
# install build requirements
|
# install build requirements
|
||||||
RUN PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu" python3 -m pip install -r /workspace/vllm/requirements-build.txt
|
RUN PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu" python3 -m pip install -r /workspace/vllm/requirements-build.txt
|
||||||
|
@ -267,23 +267,16 @@ def get_neuron_sdk_version(run_lambda):
|
|||||||
|
|
||||||
|
|
||||||
def get_vllm_version():
|
def get_vllm_version():
|
||||||
version = ""
|
from vllm import __version__, __version_tuple__
|
||||||
try:
|
|
||||||
import vllm
|
if __version__ == "dev":
|
||||||
version = vllm.__version__
|
return "N/A (dev)"
|
||||||
except Exception:
|
|
||||||
pass
|
if len(__version_tuple__) == 4: # dev build
|
||||||
commit = ""
|
git_sha = __version_tuple__[-1][1:] # type: ignore
|
||||||
try:
|
return f"{__version__} (git sha: {git_sha}"
|
||||||
import vllm
|
|
||||||
commit = vllm.__commit__
|
return __version__
|
||||||
except Exception:
|
|
||||||
pass
|
|
||||||
if version != "" and commit != "":
|
|
||||||
return f"{version}@{commit}"
|
|
||||||
if version == "" and commit == "":
|
|
||||||
return "N/A"
|
|
||||||
return version or commit
|
|
||||||
|
|
||||||
def summarize_vllm_build_flags():
|
def summarize_vllm_build_flags():
|
||||||
# This could be a static method if the flags are constant, or dynamic if you need to check environment variables, etc.
|
# This could be a static method if the flags are constant, or dynamic if you need to check environment variables, etc.
|
||||||
|
@ -12,6 +12,9 @@ requires = [
|
|||||||
]
|
]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
|
[tool.setuptools_scm]
|
||||||
|
# version_file = "vllm/_version.py" # currently handled by `setup.py:get_version()`
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
# Allow lines to be as long as 80.
|
# Allow lines to be as long as 80.
|
||||||
line-length = 80
|
line-length = 80
|
||||||
|
Loading…
x
Reference in New Issue
Block a user