@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 203ab8f80f
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 16, 10:45 UTC

[CI/Build] setuptools-scm fixes (#8900)

Daniele committed Oct 14, 2024 at 20:34 UTC 203ab8f80f780baf899a8bc4b5c38a9929fa88ca
7 files changed +47 -41
.buildkite/release-pipeline.yaml
+2 -2
@@ -3,7 +3,7 @@ steps:
3 agents:
4 queue: cpu_queue
5 commands:
6 - - "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 ."
6 + - "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 ."
7 - "mkdir artifacts"
8 - "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
@@ -22,7 +22,7 @@ steps:
22 agents:
23 queue: cpu_queue
24 commands:
25 - - "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 ."
25 + - "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 ."
26 - "mkdir artifacts"
27 - "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
.dockerignore
+29 -1
@@ -2,5 +2,33 @@
2 /.venv
3 /build
4 dist
5 -Dockerfile*
5 vllm/*.so
6 +
7 +# Byte-compiled / optimized / DLL files
8 +__pycache__/
9 +*.py[cod]
10 +*$py.class
11 +
12 +.mypy_cache
13 +
14 +# Distribution / packaging
15 +.Python
16 +/build/
17 +cmake-build-*/
18 +CMakeUserPresets.json
19 +develop-eggs/
20 +/dist/
21 +downloads/
22 +eggs/
23 +.eggs/
24 +lib/
25 +lib64/
26 +parts/
27 +sdist/
28 +var/
29 +wheels/
30 +share/python-wheels/
31 +*.egg-info/
32 +.installed.cfg
33 +*.egg
34 +MANIFEST
.github/workflows/scripts/build.sh
+1 -2
@@ -8,8 +8,7 @@ PATH=${cuda_home}/bin:$PATH
8 LD_LIBRARY_PATH=${cuda_home}/lib64:$LD_LIBRARY_PATH
9
10 # Install requirements
11 -$python_executable -m pip install wheel packaging 'setuptools-scm>=8'
12 -$python_executable -m pip install -r requirements-cuda.txt
11 +$python_executable -m pip install -r requirements-build.txt -r requirements-cuda.txt
12
13 # Limit the number of parallel jobs to avoid OOM
14 export MAX_JOBS=1
Dockerfile
+1 -9
@@ -71,15 +71,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \
71 python3 -m pip install -r requirements-build.txt
72
73 # files and directories related to build wheels
74 -COPY csrc csrc
75 -COPY setup.py setup.py
76 -COPY cmake cmake
77 -COPY CMakeLists.txt CMakeLists.txt
78 -COPY README.md README.md
79 -COPY requirements-common.txt requirements-common.txt
80 -COPY requirements-cuda.txt requirements-cuda.txt
81 -COPY pyproject.toml pyproject.toml
82 -COPY vllm vllm
74 +COPY . .
75
76 # max jobs used by Ninja to build extensions
77 ARG max_jobs=2
Dockerfile.openvino
+1 -10
@@ -9,16 +9,7 @@ RUN apt-get update -y && \
9 ffmpeg libsm6 libxext6 libgl1
10 WORKDIR /workspace
11
12 -# copy requirements
13 -COPY requirements-build.txt /workspace/vllm/
14 -COPY requirements-common.txt /workspace/vllm/
15 -COPY requirements-openvino.txt /workspace/vllm/
16 -
17 -COPY vllm/ /workspace/vllm/vllm
18 -COPY csrc/core /workspace/vllm/csrc/core
19 -COPY cmake/utils.cmake /workspace/vllm/cmake/
20 -COPY CMakeLists.txt /workspace/vllm/
21 -COPY setup.py /workspace/vllm/
12 +COPY . .
13
14 # install build requirements
15 RUN PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu" python3 -m pip install -r /workspace/vllm/requirements-build.txt
collect_env.py
+10 -17
@@ -267,23 +267,16 @@ def get_neuron_sdk_version(run_lambda):
267
268
269 def get_vllm_version():
270 - version = ""
271 - try:
272 - import vllm
273 - version = vllm.__version__
274 - except Exception:
275 - pass
276 - commit = ""
277 - try:
278 - import vllm
279 - commit = vllm.__commit__
280 - except Exception:
281 - pass
282 - if version != "" and commit != "":
283 - return f"{version}@{commit}"
284 - if version == "" and commit == "":
285 - return "N/A"
286 - return version or commit
270 + from vllm import __version__, __version_tuple__
271 +
272 + if __version__ == "dev":
273 + return "N/A (dev)"
274 +
275 + if len(__version_tuple__) == 4: # dev build
276 + git_sha = __version_tuple__[-1][1:] # type: ignore
277 + return f"{__version__} (git sha: {git_sha}"
278 +
279 + return __version__
280
281 def summarize_vllm_build_flags():
282 # This could be a static method if the flags are constant, or dynamic if you need to check environment variables, etc.
pyproject.toml
+3
@@ -12,6 +12,9 @@ requires = [
12 ]
13 build-backend = "setuptools.build_meta"
14
15 +[tool.setuptools_scm]
16 +# version_file = "vllm/_version.py" # currently handled by `setup.py:get_version()`
17 +
18 [tool.ruff]
19 # Allow lines to be as long as 80.
20 line-length = 80