Skip to content

Commit af7b73c

Browse files
authored
feat: python package build with abi (cross py3.10+) (#3571)
Signed-off-by: michaelfeil <[email protected]>
1 parent abbbc18 commit af7b73c

File tree

6 files changed

+5
-21
lines changed

6 files changed

+5
-21
lines changed

container/Dockerfile

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ ARG BASE_IMAGE="nvcr.io/nvidia/cuda-dl-base"
1515
ARG BASE_IMAGE_TAG="25.01-cuda12.8-devel-ubuntu24.04"
1616

1717
# Build configuration
18-
ARG RELEASE_BUILD=false
1918
ARG ENABLE_KVBM=false
2019
ARG CARGO_BUILD_JOBS
2120

@@ -280,7 +279,6 @@ FROM quay.io/pypa/manylinux_2_28_${ARCH_ALT} AS wheel_builder
280279
ARG ARCH
281280
ARG ARCH_ALT
282281
ARG CARGO_BUILD_JOBS
283-
ARG RELEASE_BUILD
284282
ARG ENABLE_KVBM
285283
ARG USE_SCCACHE
286284
ARG SCCACHE_BUCKET
@@ -356,10 +354,6 @@ RUN --mount=type=secret,id=aws-key-id,env=AWS_ACCESS_KEY_ID \
356354
else \
357355
maturin build --release --out /opt/dynamo/dist; \
358356
fi && \
359-
if [ "$RELEASE_BUILD" = "true" ]; then \
360-
uv run --python 3.11 maturin build --release --out /opt/dynamo/dist && \
361-
uv run --python 3.10 maturin build --release --out /opt/dynamo/dist; \
362-
fi && \
363357
/tmp/use-sccache.sh show-stats "Dynamo"
364358

365359
##############################################
@@ -382,7 +376,7 @@ COPY --from=wheel_builder $CARGO_HOME $CARGO_HOME
382376
# Install Python packages
383377
COPY benchmarks/ /opt/dynamo/benchmarks/
384378
RUN uv pip install \
385-
/opt/dynamo/wheelhouse/ai_dynamo_runtime*cp312*.whl \
379+
/opt/dynamo/wheelhouse/ai_dynamo_runtime*.whl \
386380
/opt/dynamo/wheelhouse/ai_dynamo*any.whl \
387381
/opt/dynamo/wheelhouse/nixl/nixl*.whl \
388382
&& cd /opt/dynamo/benchmarks \

container/Dockerfile.sglang

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ ARG BASE_IMAGE="nvcr.io/nvidia/cuda-dl-base"
99
# for details and reproducer to manually test if the image
1010
# can be updated to later versions.
1111
ARG BASE_IMAGE_TAG="25.01-cuda12.8-devel-ubuntu24.04"
12-
ARG RELEASE_BUILD
1312
ARG RUNTIME_IMAGE="nvcr.io/nvidia/cuda"
1413
ARG RUNTIME_IMAGE_TAG="12.8.1-runtime-ubuntu24.04"
1514

@@ -204,7 +203,7 @@ COPY --from=framework ${VIRTUAL_ENV} ${VIRTUAL_ENV}
204203
COPY benchmarks/ /opt/dynamo/benchmarks/
205204
COPY --from=dynamo_base /opt/dynamo/wheelhouse/ /opt/dynamo/wheelhouse/
206205
RUN uv pip install \
207-
/opt/dynamo/wheelhouse/ai_dynamo_runtime*cp312*.whl \
206+
/opt/dynamo/wheelhouse/ai_dynamo_runtime*.whl \
208207
/opt/dynamo/wheelhouse/ai_dynamo*any.whl \
209208
/opt/dynamo/wheelhouse/nixl/nixl*.whl \
210209
&& cd /opt/dynamo/benchmarks \

container/Dockerfile.trtllm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
ARG BASE_IMAGE="nvcr.io/nvidia/pytorch"
55
ARG BASE_IMAGE_TAG="25.06-py3"
6-
ARG RELEASE_BUILD
76
ARG ENABLE_KVBM=false
87
ARG RUNTIME_IMAGE="nvcr.io/nvidia/cuda"
98
ARG RUNTIME_IMAGE_TAG="12.9.1-runtime-ubuntu24.04"
@@ -242,7 +241,7 @@ ENV LD_LIBRARY_PATH=${TENSORRT_LIB_DIR}:${LD_LIBRARY_PATH}
242241
COPY benchmarks/ /opt/dynamo/benchmarks/
243242
COPY --from=dynamo_base /opt/dynamo/wheelhouse/ /opt/dynamo/wheelhouse/
244243
RUN uv pip install \
245-
/opt/dynamo/wheelhouse/ai_dynamo_runtime*cp312*.whl \
244+
/opt/dynamo/wheelhouse/ai_dynamo_runtime*.whl \
246245
/opt/dynamo/wheelhouse/ai_dynamo*any.whl \
247246
/opt/dynamo/wheelhouse/nixl/nixl*.whl \
248247
&& cd /opt/dynamo/benchmarks \

container/Dockerfile.vllm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ ARG BASE_IMAGE="nvcr.io/nvidia/cuda-dl-base"
88
# for details and reproducer to manually test if the image
99
# can be updated to later versions.
1010
ARG BASE_IMAGE_TAG="25.01-cuda12.8-devel-ubuntu24.04"
11-
ARG RELEASE_BUILD
1211
ARG ENABLE_KVBM=false
1312
ARG RUNTIME_IMAGE="nvcr.io/nvidia/cuda"
1413
ARG RUNTIME_IMAGE_TAG="12.8.1-runtime-ubuntu24.04"
@@ -254,7 +253,7 @@ COPY --from=framework ${VIRTUAL_ENV} ${VIRTUAL_ENV}
254253
COPY benchmarks/ /opt/dynamo/benchmarks/
255254
COPY --from=dynamo_base /opt/dynamo/wheelhouse/ /opt/dynamo/wheelhouse/
256255
RUN uv pip install \
257-
/opt/dynamo/wheelhouse/ai_dynamo_runtime*cp312*.whl \
256+
/opt/dynamo/wheelhouse/ai_dynamo_runtime*.whl \
258257
/opt/dynamo/wheelhouse/ai_dynamo*any.whl \
259258
/opt/dynamo/wheelhouse/nixl/nixl*.whl \
260259
&& cd /opt/dynamo/benchmarks \

container/build.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -303,9 +303,6 @@ get_options() {
303303
missing_requirement "$1"
304304
fi
305305
;;
306-
--release-build)
307-
RELEASE_BUILD=true
308-
;;
309306
--enable-kvbm)
310307
ENABLE_KVBM=true
311308
;;
@@ -705,10 +702,6 @@ fi
705702
if [ -n "${HF_TOKEN}" ]; then
706703
BUILD_ARGS+=" --build-arg HF_TOKEN=${HF_TOKEN} "
707704
fi
708-
if [ ! -z ${RELEASE_BUILD} ]; then
709-
echo "Performing a release build!"
710-
BUILD_ARGS+=" --build-arg RELEASE_BUILD=${RELEASE_BUILD} "
711-
fi
712705

713706
if [[ $FRAMEWORK == "VLLM" ]] || [[ $FRAMEWORK == "TRTLLM" ]]; then
714707
echo "Forcing enable_kvbm to true in ${FRAMEWORK} image build"

lib/bindings/python/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ pyo3 = { version = "0.23.4", default-features = false, features = [
6060
"experimental-inspect",
6161
"extension-module",
6262
"py-clone",
63-
# "abi3-py310" # TODO: Add abi feature in follow-up, since docker build can be simplified.
63+
"abi3-py310"
6464
] }
6565

6666
pyo3-async-runtimes = { version = "0.23.0", default-features = false, features = [

0 commit comments

Comments
 (0)