mirror of https://github.com/astral-sh/uv
Set `JEMALLOC_SYS_WITH_LG_PAGE=16` in arm Docker builds (#10943)
We do this in our standard binary release pipeline, but not in our Docker images. See https://github.com/astral-sh/uv/issues/10942
This commit is contained in:
parent
4a735461b5
commit
06a03a285a
|
|
@ -23,6 +23,7 @@ RUN case "$TARGETPLATFORM" in \
|
||||||
"linux/amd64") echo "x86_64-unknown-linux-musl" > rust_target.txt ;; \
|
"linux/amd64") echo "x86_64-unknown-linux-musl" > rust_target.txt ;; \
|
||||||
*) exit 1 ;; \
|
*) exit 1 ;; \
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Update rustup whenever we bump the rust version
|
# Update rustup whenever we bump the rust version
|
||||||
COPY rust-toolchain.toml rust-toolchain.toml
|
COPY rust-toolchain.toml rust-toolchain.toml
|
||||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --target $(cat rust_target.txt) --profile minimal --default-toolchain none
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --target $(cat rust_target.txt) --profile minimal --default-toolchain none
|
||||||
|
|
@ -34,7 +35,10 @@ RUN rustup target add $(cat rust_target.txt)
|
||||||
COPY crates crates
|
COPY crates crates
|
||||||
COPY ./Cargo.toml Cargo.toml
|
COPY ./Cargo.toml Cargo.toml
|
||||||
COPY ./Cargo.lock Cargo.lock
|
COPY ./Cargo.lock Cargo.lock
|
||||||
RUN cargo zigbuild --bin uv --bin uvx --target $(cat rust_target.txt) --release
|
RUN case "${TARGETPLATFORM}" in \
|
||||||
|
"linux/arm64") export JEMALLOC_SYS_WITH_LG_PAGE=16;; \
|
||||||
|
esac && \
|
||||||
|
cargo zigbuild --bin uv --bin uvx --target $(cat rust_target.txt) --release
|
||||||
RUN cp target/$(cat rust_target.txt)/release/uv /uv \
|
RUN cp target/$(cat rust_target.txt)/release/uv /uv \
|
||||||
&& cp target/$(cat rust_target.txt)/release/uvx /uvx
|
&& cp target/$(cat rust_target.txt)/release/uvx /uvx
|
||||||
# TODO(konsti): Optimize binary size, with a version that also works when cross compiling
|
# TODO(konsti): Optimize binary size, with a version that also works when cross compiling
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue