Unverified Commit af7b73c0 authored by Michael Feil's avatar Michael Feil Committed by GitHub
Browse files

feat: python package build with abi (cross py3.10+) (#3571)


Signed-off-by: default avatarmichaelfeil <me@michaelfeil.eu>
parent abbbc187
......@@ -15,7 +15,6 @@ ARG BASE_IMAGE="nvcr.io/nvidia/cuda-dl-base"
ARG BASE_IMAGE_TAG="25.01-cuda12.8-devel-ubuntu24.04"
# Build configuration
ARG RELEASE_BUILD=false
ARG ENABLE_KVBM=false
ARG CARGO_BUILD_JOBS
......@@ -280,7 +279,6 @@ FROM quay.io/pypa/manylinux_2_28_${ARCH_ALT} AS wheel_builder
ARG ARCH
ARG ARCH_ALT
ARG CARGO_BUILD_JOBS
ARG RELEASE_BUILD
ARG ENABLE_KVBM
ARG USE_SCCACHE
ARG SCCACHE_BUCKET
......@@ -356,10 +354,6 @@ RUN --mount=type=secret,id=aws-key-id,env=AWS_ACCESS_KEY_ID \
else \
maturin build --release --out /opt/dynamo/dist; \
fi && \
if [ "$RELEASE_BUILD" = "true" ]; then \
uv run --python 3.11 maturin build --release --out /opt/dynamo/dist && \
uv run --python 3.10 maturin build --release --out /opt/dynamo/dist; \
fi && \
/tmp/use-sccache.sh show-stats "Dynamo"
##############################################
......@@ -382,7 +376,7 @@ COPY --from=wheel_builder $CARGO_HOME $CARGO_HOME
# Install Python packages
COPY benchmarks/ /opt/dynamo/benchmarks/
RUN uv pip install \
/opt/dynamo/wheelhouse/ai_dynamo_runtime*cp312*.whl \
/opt/dynamo/wheelhouse/ai_dynamo_runtime*.whl \
/opt/dynamo/wheelhouse/ai_dynamo*any.whl \
/opt/dynamo/wheelhouse/nixl/nixl*.whl \
&& cd /opt/dynamo/benchmarks \
......
......@@ -9,7 +9,6 @@ ARG BASE_IMAGE="nvcr.io/nvidia/cuda-dl-base"
# for details and reproducer to manually test if the image
# can be updated to later versions.
ARG BASE_IMAGE_TAG="25.01-cuda12.8-devel-ubuntu24.04"
ARG RELEASE_BUILD
ARG RUNTIME_IMAGE="nvcr.io/nvidia/cuda"
ARG RUNTIME_IMAGE_TAG="12.8.1-runtime-ubuntu24.04"
......@@ -204,7 +203,7 @@ COPY --from=framework ${VIRTUAL_ENV} ${VIRTUAL_ENV}
COPY benchmarks/ /opt/dynamo/benchmarks/
COPY --from=dynamo_base /opt/dynamo/wheelhouse/ /opt/dynamo/wheelhouse/
RUN uv pip install \
/opt/dynamo/wheelhouse/ai_dynamo_runtime*cp312*.whl \
/opt/dynamo/wheelhouse/ai_dynamo_runtime*.whl \
/opt/dynamo/wheelhouse/ai_dynamo*any.whl \
/opt/dynamo/wheelhouse/nixl/nixl*.whl \
&& cd /opt/dynamo/benchmarks \
......
......@@ -3,7 +3,6 @@
ARG BASE_IMAGE="nvcr.io/nvidia/pytorch"
ARG BASE_IMAGE_TAG="25.06-py3"
ARG RELEASE_BUILD
ARG ENABLE_KVBM=false
ARG RUNTIME_IMAGE="nvcr.io/nvidia/cuda"
ARG RUNTIME_IMAGE_TAG="12.9.1-runtime-ubuntu24.04"
......@@ -242,7 +241,7 @@ ENV LD_LIBRARY_PATH=${TENSORRT_LIB_DIR}:${LD_LIBRARY_PATH}
COPY benchmarks/ /opt/dynamo/benchmarks/
COPY --from=dynamo_base /opt/dynamo/wheelhouse/ /opt/dynamo/wheelhouse/
RUN uv pip install \
/opt/dynamo/wheelhouse/ai_dynamo_runtime*cp312*.whl \
/opt/dynamo/wheelhouse/ai_dynamo_runtime*.whl \
/opt/dynamo/wheelhouse/ai_dynamo*any.whl \
/opt/dynamo/wheelhouse/nixl/nixl*.whl \
&& cd /opt/dynamo/benchmarks \
......
......@@ -8,7 +8,6 @@ ARG BASE_IMAGE="nvcr.io/nvidia/cuda-dl-base"
# for details and reproducer to manually test if the image
# can be updated to later versions.
ARG BASE_IMAGE_TAG="25.01-cuda12.8-devel-ubuntu24.04"
ARG RELEASE_BUILD
ARG ENABLE_KVBM=false
ARG RUNTIME_IMAGE="nvcr.io/nvidia/cuda"
ARG RUNTIME_IMAGE_TAG="12.8.1-runtime-ubuntu24.04"
......@@ -254,7 +253,7 @@ COPY --from=framework ${VIRTUAL_ENV} ${VIRTUAL_ENV}
COPY benchmarks/ /opt/dynamo/benchmarks/
COPY --from=dynamo_base /opt/dynamo/wheelhouse/ /opt/dynamo/wheelhouse/
RUN uv pip install \
/opt/dynamo/wheelhouse/ai_dynamo_runtime*cp312*.whl \
/opt/dynamo/wheelhouse/ai_dynamo_runtime*.whl \
/opt/dynamo/wheelhouse/ai_dynamo*any.whl \
/opt/dynamo/wheelhouse/nixl/nixl*.whl \
&& cd /opt/dynamo/benchmarks \
......
......@@ -303,9 +303,6 @@ get_options() {
missing_requirement "$1"
fi
;;
--release-build)
RELEASE_BUILD=true
;;
--enable-kvbm)
ENABLE_KVBM=true
;;
......@@ -705,10 +702,6 @@ fi
if [ -n "${HF_TOKEN}" ]; then
BUILD_ARGS+=" --build-arg HF_TOKEN=${HF_TOKEN} "
fi
if [ ! -z ${RELEASE_BUILD} ]; then
echo "Performing a release build!"
BUILD_ARGS+=" --build-arg RELEASE_BUILD=${RELEASE_BUILD} "
fi
if [[ $FRAMEWORK == "VLLM" ]] || [[ $FRAMEWORK == "TRTLLM" ]]; then
echo "Forcing enable_kvbm to true in ${FRAMEWORK} image build"
......
......@@ -60,7 +60,7 @@ pyo3 = { version = "0.23.4", default-features = false, features = [
"experimental-inspect",
"extension-module",
"py-clone",
# "abi3-py310" # TODO: Add abi feature in follow-up, since docker build can be simplified.
"abi3-py310"
] }
pyo3-async-runtimes = { version = "0.23.0", default-features = false, features = [
......
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