[Refactor] Move auxiliary files out of the repository root (#58572)
Signed-off-by: mgoin <mgoin64@gmail.com>
This commit is contained in:
+19
-19
@@ -207,7 +207,7 @@ ARG PYTORCH_NIGHTLY
|
||||
# Check whether to install torch nightly instead of release for this build
|
||||
COPY requirements/common.txt requirements/common.txt
|
||||
COPY requirements/cuda.txt requirements/cuda.txt
|
||||
COPY use_existing_torch.py use_existing_torch.py
|
||||
COPY tools/use_existing_torch.py tools/use_existing_torch.py
|
||||
COPY pyproject.toml pyproject.toml
|
||||
RUN --mount=type=cache,target=/opt/uv/cache \
|
||||
--mount=type=bind,source=requirements,target=/tmp/vllm-requirements,ro \
|
||||
@@ -229,7 +229,7 @@ RUN --mount=type=cache,target=/opt/uv/cache \
|
||||
fi \
|
||||
&& if [ "${INSTALL_RUBIN_PRERELEASE}" = "true" ]; then \
|
||||
echo "Installing Rubin prerelease requirements..." \
|
||||
&& /opt/venv/bin/python3 use_existing_torch.py --prefix \
|
||||
&& /opt/venv/bin/python3 tools/use_existing_torch.py --prefix \
|
||||
&& uv pip install --python /opt/venv/bin/python3 \
|
||||
--prerelease=allow --index-strategy unsafe-first-match \
|
||||
-r /tmp/vllm-requirements/rubin-prerelease.txt \
|
||||
@@ -243,7 +243,7 @@ RUN --mount=type=cache,target=/opt/uv/cache \
|
||||
&& uv pip install --python /opt/venv/bin/python3 torch torchaudio torchvision --pre \
|
||||
--index-url ${PYTORCH_CUDA_INDEX_BASE_URL}/nightly/cu$(echo $CUDA_VERSION | cut -d. -f1,2 | tr -d '.') \
|
||||
&& echo "Installing other requirements..." \
|
||||
&& /opt/venv/bin/python3 use_existing_torch.py --prefix \
|
||||
&& /opt/venv/bin/python3 tools/use_existing_torch.py --prefix \
|
||||
&& uv pip install --python /opt/venv/bin/python3 -r requirements/cuda.txt \
|
||||
--extra-index-url ${PYTORCH_CUDA_INDEX_BASE_URL}/nightly/cu$(echo $CUDA_VERSION | cut -d. -f1,2 | tr -d '.'); \
|
||||
else \
|
||||
@@ -316,12 +316,12 @@ COPY requirements/build/rust.txt requirements/build/rust.txt
|
||||
RUN --mount=type=cache,target=/opt/uv/cache \
|
||||
uv pip install --python /opt/venv/bin/python3 -r requirements/build/rust.txt
|
||||
|
||||
# Copy only the Rust build inputs; build_rust.sh publishes artifacts needed
|
||||
# Copy only the Rust build inputs; tools/build_rust.sh publishes artifacts needed
|
||||
# by the wheel build stage.
|
||||
COPY rust rust
|
||||
COPY rust-toolchain.toml rust-toolchain.toml
|
||||
COPY tools/build_rust.py tools/build_rust.py
|
||||
COPY build_rust.sh build_rust.sh
|
||||
COPY tools/build_rust.sh tools/build_rust.sh
|
||||
|
||||
# Cap cargo parallelism to avoid exhausting the CI host's open-file limit
|
||||
# (rustc spawns enough concurrent processes to hit RLIMIT_NOFILE otherwise).
|
||||
@@ -341,7 +341,7 @@ RUN --mount=type=cache,target=/root/.cargo/registry,sharing=locked \
|
||||
export RUSTC_WRAPPER=sccache; \
|
||||
sccache --show-stats; \
|
||||
fi \
|
||||
&& SETUPTOOLS_SCM_PRETEND_VERSION="0.0.0+docker.cache" bash build_rust.sh \
|
||||
&& SETUPTOOLS_SCM_PRETEND_VERSION="0.0.0+docker.cache" bash tools/build_rust.sh \
|
||||
&& if [ "$USE_SCCACHE" = "1" ]; then \
|
||||
sccache --show-stats; \
|
||||
fi
|
||||
@@ -352,7 +352,7 @@ FROM rust-build-cache AS rust-build
|
||||
RUN --mount=type=cache,target=/root/.cargo/registry,sharing=locked \
|
||||
--mount=type=cache,target=/root/.cargo/git,sharing=locked \
|
||||
--mount=type=bind,source=.git,target=.git \
|
||||
SETUPTOOLS_SCM_PRETEND_METADATA="{dirty=false}" bash build_rust.sh
|
||||
SETUPTOOLS_SCM_PRETEND_METADATA="{dirty=false}" bash tools/build_rust.sh
|
||||
#################### RUST BUILD IMAGE ####################
|
||||
|
||||
#################### CSRC BUILD IMAGE ####################
|
||||
@@ -368,7 +368,7 @@ ARG PYTORCH_NIGHTLY
|
||||
|
||||
# Install build dependencies
|
||||
COPY requirements/build/cuda.txt requirements/build/cuda.txt
|
||||
COPY use_existing_torch.py use_existing_torch.py
|
||||
COPY tools/use_existing_torch.py tools/use_existing_torch.py
|
||||
COPY --from=base /workspace/torch_lib_versions.txt torch_lib_versions.txt
|
||||
|
||||
# This timeout (in seconds) is necessary when installing some dependencies via uv since it's likely to time out
|
||||
@@ -381,11 +381,11 @@ ENV UV_LINK_MODE=copy
|
||||
RUN --mount=type=cache,target=/opt/uv/cache \
|
||||
if [ "${INSTALL_RUBIN_PRERELEASE}" = "true" ]; then \
|
||||
echo "Installing build requirements with Rubin prerelease PyTorch..." \
|
||||
&& python3 use_existing_torch.py --prefix \
|
||||
&& python3 tools/use_existing_torch.py --prefix \
|
||||
&& uv pip install --python /opt/venv/bin/python3 -r requirements/build/cuda.txt; \
|
||||
elif [ "${PYTORCH_NIGHTLY}" = "1" ]; then \
|
||||
echo "Installing build requirements without torch..." \
|
||||
&& python3 use_existing_torch.py --prefix \
|
||||
&& python3 tools/use_existing_torch.py --prefix \
|
||||
&& uv pip install --python /opt/venv/bin/python3 -r requirements/build/cuda.txt \
|
||||
&& echo "Installing torch nightly..." \
|
||||
&& uv pip install --python /opt/venv/bin/python3 $(cat torch_lib_versions.txt | grep -i "^torch=" | xargs) --pre \
|
||||
@@ -427,7 +427,7 @@ ENV SETUPTOOLS_SCM_PRETEND_VERSION="0.0.0+csrc.build"
|
||||
RUN --mount=type=cache,target=/opt/uv/cache \
|
||||
if [ "${PYTORCH_NIGHTLY}" = "1" ] || \
|
||||
[ "${INSTALL_RUBIN_PRERELEASE}" = "true" ]; then \
|
||||
python3 use_existing_torch.py --prefix; \
|
||||
python3 tools/use_existing_torch.py --prefix; \
|
||||
fi
|
||||
|
||||
# Provision one bare Python per `requires-python` entry; cmake reads
|
||||
@@ -605,7 +605,7 @@ ARG PYTORCH_NIGHTLY
|
||||
|
||||
# Install build dependencies
|
||||
COPY requirements/build/cuda.txt requirements/build/cuda.txt
|
||||
COPY use_existing_torch.py use_existing_torch.py
|
||||
COPY tools/use_existing_torch.py tools/use_existing_torch.py
|
||||
COPY --from=base /workspace/torch_lib_versions.txt torch_lib_versions.txt
|
||||
|
||||
# This timeout (in seconds) is necessary when installing some dependencies via uv since it's likely to time out
|
||||
@@ -618,11 +618,11 @@ ENV UV_LINK_MODE=copy
|
||||
RUN --mount=type=cache,target=/opt/uv/cache \
|
||||
if [ "${INSTALL_RUBIN_PRERELEASE}" = "true" ]; then \
|
||||
echo "Installing build requirements with Rubin prerelease PyTorch..." \
|
||||
&& python3 use_existing_torch.py --prefix \
|
||||
&& python3 tools/use_existing_torch.py --prefix \
|
||||
&& uv pip install --python /opt/venv/bin/python3 -r requirements/build/cuda.txt; \
|
||||
elif [ "${PYTORCH_NIGHTLY}" = "1" ]; then \
|
||||
echo "Installing build requirements without torch..." \
|
||||
&& python3 use_existing_torch.py --prefix \
|
||||
&& python3 tools/use_existing_torch.py --prefix \
|
||||
&& uv pip install --python /opt/venv/bin/python3 -r requirements/build/cuda.txt \
|
||||
&& echo "Installing torch nightly..." \
|
||||
&& uv pip install --python /opt/venv/bin/python3 $(cat torch_lib_versions.txt | grep -i "^torch=" | xargs) --pre \
|
||||
@@ -658,7 +658,7 @@ ENV VLLM_SKIP_PRECOMPILED_VERSION_SUFFIX=1
|
||||
RUN --mount=type=cache,target=/opt/uv/cache \
|
||||
if [ "${PYTORCH_NIGHTLY}" = "1" ] || \
|
||||
[ "${INSTALL_RUBIN_PRERELEASE}" = "true" ]; then \
|
||||
python3 use_existing_torch.py --prefix; \
|
||||
python3 tools/use_existing_torch.py --prefix; \
|
||||
fi \
|
||||
&& if [ "${INSTALL_RUBIN_PRERELEASE}" = "true" ]; then \
|
||||
sed -Ei '/^[[:space:]]*(flashinfer-python|nvidia-cutlass-dsl\[cu13\]|quack-kernels)[[:space:]]*==/Id' \
|
||||
@@ -729,12 +729,12 @@ COPY requirements/lint.txt requirements/lint.txt
|
||||
COPY requirements/test/cuda.in requirements/test/cuda.in
|
||||
COPY requirements/test/cuda.txt requirements/test/cuda.txt
|
||||
COPY requirements/dev.txt requirements/dev.txt
|
||||
COPY use_existing_torch.py use_existing_torch.py
|
||||
COPY tools/use_existing_torch.py tools/use_existing_torch.py
|
||||
COPY --from=base /workspace/torch_lib_versions.txt torch_lib_versions.txt
|
||||
RUN --mount=type=cache,target=/opt/uv/cache \
|
||||
if [ "${PYTORCH_NIGHTLY}" = "1" ]; then \
|
||||
echo "Installing dev requirements plus torch nightly..." \
|
||||
&& python3 use_existing_torch.py --prefix \
|
||||
&& python3 tools/use_existing_torch.py --prefix \
|
||||
&& cat torch_lib_versions.txt >> requirements/test/cuda.in \
|
||||
&& uv pip compile requirements/test/cuda.in -o requirements/test/cuda.txt --index-strategy unsafe-best-match \
|
||||
--extra-index-url ${PYTORCH_CUDA_INDEX_BASE_URL}/nightly/cu$(echo $CUDA_VERSION | cut -d. -f1,2 | tr -d '.') \
|
||||
@@ -1143,14 +1143,14 @@ COPY requirements/lint.txt requirements/lint.txt
|
||||
COPY requirements/test/cuda.in requirements/test/cuda.in
|
||||
COPY requirements/test/cuda.txt requirements/test/cuda.txt
|
||||
COPY requirements/dev.txt requirements/dev.txt
|
||||
COPY use_existing_torch.py use_existing_torch.py
|
||||
COPY tools/use_existing_torch.py tools/use_existing_torch.py
|
||||
COPY --from=base /workspace/torch_lib_versions.txt torch_lib_versions.txt
|
||||
RUN --mount=type=cache,target=/opt/uv/cache \
|
||||
CUDA_MAJOR="${CUDA_VERSION%%.*}"; \
|
||||
if [ "$CUDA_MAJOR" -ge 12 ]; then \
|
||||
if [ "${PYTORCH_NIGHTLY}" = "1" ]; then \
|
||||
echo "Installing dev requirements plus torch nightly..." \
|
||||
&& python3 use_existing_torch.py --prefix \
|
||||
&& python3 tools/use_existing_torch.py --prefix \
|
||||
&& cat torch_lib_versions.txt >> requirements/test/cuda.in \
|
||||
&& uv pip compile requirements/test/cuda.in -o requirements/test/cuda.txt --index-strategy unsafe-best-match \
|
||||
--extra-index-url ${PYTORCH_CUDA_INDEX_BASE_URL}/nightly/cu$(echo $CUDA_VERSION | cut -d. -f1,2 | tr -d '.') \
|
||||
|
||||
Reference in New Issue
Block a user