[Refactor] Move auxiliary files out of the repository root (#58572)
Signed-off-by: mgoin <mgoin64@gmail.com>
This commit is contained in:
@@ -14,12 +14,12 @@ WORKDIR /workspace
|
||||
COPY requirements/build/rust.txt requirements/build/rust.txt
|
||||
RUN python3 -m pip install --no-cache-dir -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).
|
||||
@@ -29,7 +29,7 @@ ENV CARGO_BUILD_JOBS=4
|
||||
# inputs. The child stage below relinks the crates that embed the exact version.
|
||||
RUN --mount=type=cache,target=/root/.cargo/registry,sharing=locked \
|
||||
--mount=type=cache,target=/root/.cargo/git,sharing=locked \
|
||||
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
|
||||
|
||||
# Relink with the exact Git-derived package version.
|
||||
FROM rust-build-cache AS rust-build
|
||||
@@ -37,7 +37,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
|
||||
|
||||
FROM ubuntu:24.04 AS vllm-base
|
||||
|
||||
|
||||
Reference in New Issue
Block a user