Unverified Commit 206e2577 authored by Harry Mellor's avatar Harry Mellor Committed by GitHub
Browse files

Move requirements into their own directory (#12547)


Signed-off-by: default avatarHarry Mellor <19981378+hmellor@users.noreply.github.com>
parent e02883c4
...@@ -426,7 +426,7 @@ main() { ...@@ -426,7 +426,7 @@ main() {
pip install -U transformers pip install -U transformers
pip install -r requirements-dev.txt pip install -r requirements/dev.txt
which genai-perf which genai-perf
# check storage # check storage
......
...@@ -35,7 +35,7 @@ function cpu_tests() { ...@@ -35,7 +35,7 @@ function cpu_tests() {
# Run basic model test # Run basic model test
docker exec cpu-test-"$BUILDKITE_BUILD_NUMBER"-"$NUMA_NODE" bash -c " docker exec cpu-test-"$BUILDKITE_BUILD_NUMBER"-"$NUMA_NODE" bash -c "
set -e set -e
pip install -r vllm/requirements-test.txt pip install -r vllm/requirements/test.txt
pytest -v -s tests/models/decoder_only/language -m cpu_model pytest -v -s tests/models/decoder_only/language -m cpu_model
pytest -v -s tests/models/embedding/language -m cpu_model pytest -v -s tests/models/embedding/language -m cpu_model
pytest -v -s tests/models/encoder_decoder/language -m cpu_model pytest -v -s tests/models/encoder_decoder/language -m cpu_model
......
...@@ -35,7 +35,7 @@ steps: ...@@ -35,7 +35,7 @@ steps:
fast_check: true fast_check: true
no_gpu: True no_gpu: True
commands: commands:
- pip install -r requirements-docs.txt - pip install -r ../../requirements/docs.txt
- SPHINXOPTS=\"-W\" make html - SPHINXOPTS=\"-W\" make html
# Check API reference (if it fails, you may have missing mock imports) # Check API reference (if it fails, you may have missing mock imports)
- grep \"sig sig-object py\" build/html/api/inference_params.html - grep \"sig sig-object py\" build/html/api/inference_params.html
......
...@@ -50,7 +50,7 @@ jobs: ...@@ -50,7 +50,7 @@ jobs:
# matrix: # matrix:
# os: ['ubuntu-20.04'] # os: ['ubuntu-20.04']
# python-version: ['3.9', '3.10', '3.11', '3.12'] # python-version: ['3.9', '3.10', '3.11', '3.12']
# pytorch-version: ['2.4.0'] # Must be the most recent version that meets requirements-cuda.txt. # pytorch-version: ['2.4.0'] # Must be the most recent version that meets requirements/cuda.txt.
# cuda-version: ['11.8', '12.1'] # cuda-version: ['11.8', '12.1']
# steps: # steps:
......
...@@ -9,7 +9,7 @@ PATH=${cuda_home}/bin:$PATH ...@@ -9,7 +9,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 -r requirements-build.txt -r requirements-cuda.txt $python_executable -m pip install -r requirements/build.txt -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
......
...@@ -44,8 +44,8 @@ repos: ...@@ -44,8 +44,8 @@ repos:
rev: 0.6.2 rev: 0.6.2
hooks: hooks:
- id: pip-compile - id: pip-compile
args: [requirements-test.in, -o, requirements-test.txt] args: [requirements/test.in, -o, requirements/test.txt]
files: ^requirements-test\.(in|txt)$ files: ^requirements/test\.(in|txt)$
- repo: local - repo: local
hooks: hooks:
- id: mypy-local - id: mypy-local
......
...@@ -18,4 +18,4 @@ formats: [] ...@@ -18,4 +18,4 @@ formats: []
# Optionally declare the Python requirements required to build your docs # Optionally declare the Python requirements required to build your docs
python: python:
install: install:
- requirements: docs/requirements-docs.txt - requirements: requirements/docs.txt
...@@ -55,10 +55,10 @@ RUN --mount=type=cache,target=/root/.cache/uv \ ...@@ -55,10 +55,10 @@ RUN --mount=type=cache,target=/root/.cache/uv \
uv pip install --index-url https://download.pytorch.org/whl/nightly/cu126 "torch==2.7.0.dev20250121+cu126" "torchvision==0.22.0.dev20250121"; \ uv pip install --index-url https://download.pytorch.org/whl/nightly/cu126 "torch==2.7.0.dev20250121+cu126" "torchvision==0.22.0.dev20250121"; \
fi fi
COPY requirements-common.txt requirements-common.txt COPY requirements/common.txt requirements/common.txt
COPY requirements-cuda.txt requirements-cuda.txt COPY requirements/cuda.txt requirements/cuda.txt
RUN --mount=type=cache,target=/root/.cache/uv \ RUN --mount=type=cache,target=/root/.cache/uv \
uv pip install -r requirements-cuda.txt uv pip install -r requirements/cuda.txt
# cuda arch list used by torch # cuda arch list used by torch
# can be useful for both `dev` and `test` # can be useful for both `dev` and `test`
...@@ -76,14 +76,14 @@ FROM base AS build ...@@ -76,14 +76,14 @@ FROM base AS build
ARG TARGETPLATFORM ARG TARGETPLATFORM
# install build dependencies # install build dependencies
COPY requirements-build.txt requirements-build.txt COPY requirements/build.txt requirements/build.txt
# This timeout (in seconds) is necessary when installing some dependencies via uv since it's likely to time out # This timeout (in seconds) is necessary when installing some dependencies via uv since it's likely to time out
# Reference: https://github.com/astral-sh/uv/pull/1694 # Reference: https://github.com/astral-sh/uv/pull/1694
ENV UV_HTTP_TIMEOUT=500 ENV UV_HTTP_TIMEOUT=500
RUN --mount=type=cache,target=/root/.cache/uv \ RUN --mount=type=cache,target=/root/.cache/uv \
uv pip install -r requirements-build.txt uv pip install -r requirements/build.txt
COPY . . COPY . .
ARG GIT_REPO_CHECK=0 ARG GIT_REPO_CHECK=0
...@@ -151,11 +151,11 @@ FROM base as dev ...@@ -151,11 +151,11 @@ FROM base as dev
# Reference: https://github.com/astral-sh/uv/pull/1694 # Reference: https://github.com/astral-sh/uv/pull/1694
ENV UV_HTTP_TIMEOUT=500 ENV UV_HTTP_TIMEOUT=500
COPY requirements-lint.txt requirements-lint.txt COPY requirements/lint.txt requirements/lint.txt
COPY requirements-test.txt requirements-test.txt COPY requirements/test.txt requirements/test.txt
COPY requirements-dev.txt requirements-dev.txt COPY requirements/dev.txt requirements/dev.txt
RUN --mount=type=cache,target=/root/.cache/uv \ RUN --mount=type=cache,target=/root/.cache/uv \
uv pip install -r requirements-dev.txt uv pip install -r requirements/dev.txt
#################### DEV IMAGE #################### #################### DEV IMAGE ####################
#################### vLLM installation IMAGE #################### #################### vLLM installation IMAGE ####################
...@@ -230,9 +230,9 @@ COPY examples examples ...@@ -230,9 +230,9 @@ COPY examples examples
# some issues w.r.t. JIT compilation. Therefore we need to # some issues w.r.t. JIT compilation. Therefore we need to
# install build dependencies for JIT compilation. # install build dependencies for JIT compilation.
# TODO: Remove this once FlashInfer AOT wheel is fixed # TODO: Remove this once FlashInfer AOT wheel is fixed
COPY requirements-build.txt requirements-build.txt COPY requirements/build.txt requirements/build.txt
RUN --mount=type=cache,target=/root/.cache/uv \ RUN --mount=type=cache,target=/root/.cache/uv \
uv pip install -r requirements-build.txt uv pip install -r requirements/build.txt
#################### vLLM installation IMAGE #################### #################### vLLM installation IMAGE ####################
...@@ -249,7 +249,7 @@ ENV UV_HTTP_TIMEOUT=500 ...@@ -249,7 +249,7 @@ ENV UV_HTTP_TIMEOUT=500
# install development dependencies (for testing) # install development dependencies (for testing)
RUN --mount=type=cache,target=/root/.cache/uv \ RUN --mount=type=cache,target=/root/.cache/uv \
uv pip install -r requirements-dev.txt uv pip install -r requirements/dev.txt
# install development dependencies (for testing) # install development dependencies (for testing)
RUN --mount=type=cache,target=/root/.cache/uv \ RUN --mount=type=cache,target=/root/.cache/uv \
......
...@@ -26,18 +26,18 @@ WORKDIR /workspace ...@@ -26,18 +26,18 @@ WORKDIR /workspace
ARG PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu" ARG PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu"
ENV PIP_EXTRA_INDEX_URL=${PIP_EXTRA_INDEX_URL} ENV PIP_EXTRA_INDEX_URL=${PIP_EXTRA_INDEX_URL}
RUN --mount=type=cache,target=/root/.cache/pip \ RUN --mount=type=cache,target=/root/.cache/pip \
--mount=type=bind,src=requirements-build.txt,target=requirements-build.txt \ --mount=type=bind,src=requirements/build.txt,target=requirements/build.txt \
pip install --upgrade pip && \ pip install --upgrade pip && \
pip install -r requirements-build.txt pip install -r requirements/build.txt
FROM cpu-test-arm AS build FROM cpu-test-arm AS build
WORKDIR /workspace/vllm WORKDIR /workspace/vllm
RUN --mount=type=cache,target=/root/.cache/pip \ RUN --mount=type=cache,target=/root/.cache/pip \
--mount=type=bind,src=requirements-common.txt,target=requirements-common.txt \ --mount=type=bind,src=requirements/common.txt,target=requirements/common.txt \
--mount=type=bind,src=requirements-cpu.txt,target=requirements-cpu.txt \ --mount=type=bind,src=requirements/cpu.txt,target=requirements/cpu.txt \
pip install -v -r requirements-cpu.txt pip install -v -r requirements/cpu.txt
COPY . . COPY . .
ARG GIT_REPO_CHECK=0 ARG GIT_REPO_CHECK=0
......
...@@ -29,18 +29,18 @@ WORKDIR /workspace ...@@ -29,18 +29,18 @@ WORKDIR /workspace
ARG PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu" ARG PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu"
ENV PIP_EXTRA_INDEX_URL=${PIP_EXTRA_INDEX_URL} ENV PIP_EXTRA_INDEX_URL=${PIP_EXTRA_INDEX_URL}
RUN --mount=type=cache,target=/root/.cache/pip \ RUN --mount=type=cache,target=/root/.cache/pip \
--mount=type=bind,src=requirements-build.txt,target=requirements-build.txt \ --mount=type=bind,src=requirements/build.txt,target=requirements/build.txt \
pip install --upgrade pip && \ pip install --upgrade pip && \
pip install -r requirements-build.txt pip install -r requirements/build.txt
FROM cpu-test-1 AS build FROM cpu-test-1 AS build
WORKDIR /workspace/vllm WORKDIR /workspace/vllm
RUN --mount=type=cache,target=/root/.cache/pip \ RUN --mount=type=cache,target=/root/.cache/pip \
--mount=type=bind,src=requirements-common.txt,target=requirements-common.txt \ --mount=type=bind,src=requirements/common.txt,target=requirements/common.txt \
--mount=type=bind,src=requirements-cpu.txt,target=requirements-cpu.txt \ --mount=type=bind,src=requirements/cpu.txt,target=requirements/cpu.txt \
pip install -v -r requirements-cpu.txt pip install -v -r requirements/cpu.txt
COPY . . COPY . .
ARG GIT_REPO_CHECK=0 ARG GIT_REPO_CHECK=0
......
...@@ -4,7 +4,7 @@ COPY ./ /workspace/vllm ...@@ -4,7 +4,7 @@ COPY ./ /workspace/vllm
WORKDIR /workspace/vllm WORKDIR /workspace/vllm
RUN pip install -v -r requirements-hpu.txt RUN pip install -v -r requirements/hpu.txt
ENV no_proxy=localhost,127.0.0.1 ENV no_proxy=localhost,127.0.0.1
ENV PT_HPU_ENABLE_LAZY_COLLECTIVES=true ENV PT_HPU_ENABLE_LAZY_COLLECTIVES=true
......
...@@ -36,7 +36,7 @@ RUN --mount=type=bind,source=.git,target=.git \ ...@@ -36,7 +36,7 @@ RUN --mount=type=bind,source=.git,target=.git \
RUN python3 -m pip install -U \ RUN python3 -m pip install -U \
'cmake>=3.26' ninja packaging 'setuptools-scm>=8' wheel jinja2 \ 'cmake>=3.26' ninja packaging 'setuptools-scm>=8' wheel jinja2 \
-r requirements-neuron.txt -r requirements/neuron.txt
ENV VLLM_TARGET_DEVICE neuron ENV VLLM_TARGET_DEVICE neuron
RUN --mount=type=bind,source=.git,target=.git \ RUN --mount=type=bind,source=.git,target=.git \
......
...@@ -16,7 +16,7 @@ RUN --mount=type=bind,source=.git,target=.git \ ...@@ -16,7 +16,7 @@ RUN --mount=type=bind,source=.git,target=.git \
RUN python3 -m pip install -U pip RUN python3 -m pip install -U pip
# install build requirements # install build requirements
RUN PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu" python3 -m pip install -r /workspace/requirements-build.txt RUN PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu" python3 -m pip install -r /workspace/requirements/build.txt
# build vLLM with OpenVINO backend # build vLLM with OpenVINO backend
RUN PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu" VLLM_TARGET_DEVICE="openvino" python3 -m pip install /workspace RUN PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu" VLLM_TARGET_DEVICE="openvino" python3 -m pip install /workspace
......
...@@ -6,7 +6,7 @@ ENV PATH="/usr/local/cargo/bin:$PATH:/opt/conda/bin/" ...@@ -6,7 +6,7 @@ ENV PATH="/usr/local/cargo/bin:$PATH:/opt/conda/bin/"
RUN apt-get update -y && apt-get install -y git wget kmod curl vim libnuma-dev libsndfile-dev libprotobuf-dev build-essential ffmpeg libsm6 libxext6 libgl1 libssl-dev RUN apt-get update -y && apt-get install -y git wget kmod curl vim libnuma-dev libsndfile-dev libprotobuf-dev build-essential ffmpeg libsm6 libxext6 libgl1 libssl-dev
# Some packages in requirements-cpu are installed here # Some packages in requirements/cpu are installed here
# IBM provides optimized packages for ppc64le processors in the open-ce project for mamba # IBM provides optimized packages for ppc64le processors in the open-ce project for mamba
# Currently these may not be available for venv or pip directly # Currently these may not be available for venv or pip directly
RUN micromamba install -y -n base -c https://ftp.osuosl.org/pub/open-ce/1.11.0-p10/ -c defaults python=3.10 rust && micromamba clean --all --yes RUN micromamba install -y -n base -c https://ftp.osuosl.org/pub/open-ce/1.11.0-p10/ -c defaults python=3.10 rust && micromamba clean --all --yes
...@@ -21,7 +21,7 @@ RUN --mount=type=bind,source=.git,target=.git \ ...@@ -21,7 +21,7 @@ RUN --mount=type=bind,source=.git,target=.git \
RUN --mount=type=cache,target=/root/.cache/pip \ RUN --mount=type=cache,target=/root/.cache/pip \
RUSTFLAGS='-L /opt/conda/lib' pip install -v --prefer-binary --extra-index-url https://repo.fury.io/mgiessing \ RUSTFLAGS='-L /opt/conda/lib' pip install -v --prefer-binary --extra-index-url https://repo.fury.io/mgiessing \
'cmake>=3.26' ninja packaging 'setuptools-scm>=8' wheel jinja2 \ 'cmake>=3.26' ninja packaging 'setuptools-scm>=8' wheel jinja2 \
-r requirements-cpu.txt \ -r requirements/cpu.txt \
xformers uvloop==0.20.0 xformers uvloop==0.20.0
RUN --mount=type=bind,source=.git,target=.git \ RUN --mount=type=bind,source=.git,target=.git \
......
...@@ -38,7 +38,7 @@ FROM fetch_vllm AS build_vllm ...@@ -38,7 +38,7 @@ FROM fetch_vllm AS build_vllm
ARG USE_CYTHON ARG USE_CYTHON
# Build vLLM # Build vLLM
RUN cd vllm \ RUN cd vllm \
&& python3 -m pip install -r requirements-rocm.txt \ && python3 -m pip install -r requirements/rocm.txt \
&& python3 setup.py clean --all \ && python3 setup.py clean --all \
&& if [ ${USE_CYTHON} -eq "1" ]; then python3 setup_cython.py build_ext --inplace; fi \ && if [ ${USE_CYTHON} -eq "1" ]; then python3 setup_cython.py build_ext --inplace; fi \
&& python3 setup.py bdist_wheel --dist-dir=dist && python3 setup.py bdist_wheel --dist-dir=dist
...@@ -60,7 +60,7 @@ RUN python3 -m pip install --upgrade pip && rm -rf /var/lib/apt/lists/* ...@@ -60,7 +60,7 @@ RUN python3 -m pip install --upgrade pip && rm -rf /var/lib/apt/lists/*
# Install vLLM # Install vLLM
RUN --mount=type=bind,from=export_vllm,src=/,target=/install \ RUN --mount=type=bind,from=export_vllm,src=/,target=/install \
cd /install \ cd /install \
&& pip install -U -r requirements-rocm.txt \ && pip install -U -r requirements/rocm.txt \
&& pip uninstall -y vllm \ && pip uninstall -y vllm \
&& pip install *.whl && pip install *.whl
...@@ -99,7 +99,7 @@ RUN if [ ${BUILD_RPD} -eq "1" ]; then \ ...@@ -99,7 +99,7 @@ RUN if [ ${BUILD_RPD} -eq "1" ]; then \
# Install vLLM # Install vLLM
RUN --mount=type=bind,from=export_vllm,src=/,target=/install \ RUN --mount=type=bind,from=export_vllm,src=/,target=/install \
cd /install \ cd /install \
&& pip install -U -r requirements-rocm.txt \ && pip install -U -r requirements/rocm.txt \
&& pip uninstall -y vllm \ && pip uninstall -y vllm \
&& pip install *.whl && pip install *.whl
......
...@@ -58,7 +58,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \ ...@@ -58,7 +58,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
cd ../../python && \ cd ../../python && \
export PYARROW_PARALLEL=4 && \ export PYARROW_PARALLEL=4 && \
export ARROW_BUILD_TYPE=release && \ export ARROW_BUILD_TYPE=release && \
uv pip install -r requirements-build.txt && \ uv pip install -r requirements/build.txt && \
python setup.py build_ext --build-type=$ARROW_BUILD_TYPE --bundle-arrow-cpp bdist_wheel python setup.py build_ext --build-type=$ARROW_BUILD_TYPE --bundle-arrow-cpp bdist_wheel
FROM python-install AS numa-build FROM python-install AS numa-build
...@@ -120,7 +120,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \ ...@@ -120,7 +120,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,from=rust,source=/root/.rustup,target=/root/.rustup,rw \ --mount=type=bind,from=rust,source=/root/.rustup,target=/root/.rustup,rw \
--mount=type=bind,from=pyarrow,source=/tmp/arrow/python/dist,target=/tmp/arrow-wheels \ --mount=type=bind,from=pyarrow,source=/tmp/arrow/python/dist,target=/tmp/arrow-wheels \
--mount=type=bind,from=torch-vision,source=/tmp/vision/dist,target=/tmp/vision-wheels/ \ --mount=type=bind,from=torch-vision,source=/tmp/vision/dist,target=/tmp/vision-wheels/ \
sed -i '/^torch/d' requirements-build.txt && \ sed -i '/^torch/d' requirements/build.txt && \
ARROW_WHL_FILE=$(ls /tmp/arrow-wheels/pyarrow-*.whl | head -n 1) && \ ARROW_WHL_FILE=$(ls /tmp/arrow-wheels/pyarrow-*.whl | head -n 1) && \
VISION_WHL_FILE=$(ls /tmp/vision-wheels/*.whl | head -n 1) && \ VISION_WHL_FILE=$(ls /tmp/vision-wheels/*.whl | head -n 1) && \
uv pip install -v \ uv pip install -v \
...@@ -128,8 +128,8 @@ RUN --mount=type=cache,target=/root/.cache/uv \ ...@@ -128,8 +128,8 @@ RUN --mount=type=cache,target=/root/.cache/uv \
$VISION_WHL_FILE \ $VISION_WHL_FILE \
--extra-index-url https://download.pytorch.org/whl/nightly/cpu \ --extra-index-url https://download.pytorch.org/whl/nightly/cpu \
--index-strategy unsafe-best-match \ --index-strategy unsafe-best-match \
-r requirements-build.txt \ -r requirements/build.txt \
-r requirements-cpu.txt -r requirements/cpu.txt
# Build and install vllm # Build and install vllm
RUN --mount=type=cache,target=/root/.cache/uv \ RUN --mount=type=cache,target=/root/.cache/uv \
......
...@@ -19,7 +19,7 @@ ENV VLLM_TARGET_DEVICE="tpu" ...@@ -19,7 +19,7 @@ ENV VLLM_TARGET_DEVICE="tpu"
RUN --mount=type=cache,target=/root/.cache/pip \ RUN --mount=type=cache,target=/root/.cache/pip \
--mount=type=bind,source=.git,target=.git \ --mount=type=bind,source=.git,target=.git \
python3 -m pip install \ python3 -m pip install \
-r requirements-tpu.txt -r requirements/tpu.txt
RUN python3 setup.py develop RUN python3 setup.py develop
# install development dependencies (for testing) # install development dependencies (for testing)
......
...@@ -25,12 +25,12 @@ RUN apt-get update -y && \ ...@@ -25,12 +25,12 @@ RUN apt-get update -y && \
wget wget
WORKDIR /workspace/vllm WORKDIR /workspace/vllm
COPY requirements-xpu.txt /workspace/vllm/requirements-xpu.txt COPY requirements/xpu.txt /workspace/vllm/requirements/xpu.txt
COPY requirements-common.txt /workspace/vllm/requirements-common.txt COPY requirements/common.txt /workspace/vllm/requirements/common.txt
RUN --mount=type=cache,target=/root/.cache/pip \ RUN --mount=type=cache,target=/root/.cache/pip \
pip install --no-cache-dir \ pip install --no-cache-dir \
-r requirements-xpu.txt -r requirements/xpu.txt
RUN git clone https://github.com/intel/pti-gpu && \ RUN git clone https://github.com/intel/pti-gpu && \
cd pti-gpu/sdk && \ cd pti-gpu/sdk && \
......
include LICENSE include LICENSE
include requirements-common.txt include requirements/common.txt
include requirements-cuda.txt include requirements/cuda.txt
include requirements-rocm.txt include requirements/rocm.txt
include requirements-neuron.txt include requirements/neuron.txt
include requirements-cpu.txt include requirements/cpu.txt
include CMakeLists.txt include CMakeLists.txt
recursive-include cmake * recursive-include cmake *
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
```bash ```bash
# Install dependencies. # Install dependencies.
pip install -r requirements-docs.txt pip install -r ../requirements/docs.txt
# Build the docs. # Build the docs.
make clean make clean
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment