From 6cf5c939811f1bb3939a1dc08f307368712c51a1 Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Tue, 17 Dec 2024 09:25:49 -0800 Subject: [PATCH] [shortfin] Use custom manylinux dockerfile in build_linux_package.sh. --- shortfin/build_tools/build_linux_package.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/shortfin/build_tools/build_linux_package.sh b/shortfin/build_tools/build_linux_package.sh index 91b944e51..c788e2924 100755 --- a/shortfin/build_tools/build_linux_package.sh +++ b/shortfin/build_tools/build_linux_package.sh @@ -37,13 +37,21 @@ REPO_ROOT="$(cd "$THIS_DIR"/../../ && pwd)" SCRIPT_NAME="$(basename $0)" ARCH="$(uname -m)" -# Note: we can switch to https://github.com/nod-ai/base-docker-images as needed for extra deps. -MANYLINUX_DOCKER_IMAGE="${MANYLINUX_DOCKER_IMAGE:-quay.io/pypa/manylinux_2_28_${ARCH}:latest}" PYTHON_VERSIONS="${OVERRIDE_PYTHON_VERSIONS:-cp311-cp311 cp312-cp312 cp313-cp313}" OUTPUT_DIR="${OUTPUT_DIR:-${THIS_DIR}/wheelhouse}" CACHE_DIR="${CACHE_DIR:-}" SHORTFIN_ENABLE_TRACING="${SHORTFIN_ENABLE_TRACING:-ON}" +if [[ "${ARCH}" == "x86_64" ]]; then + MANYLINUX_DOCKER_IMAGE="${MANYLINUX_DOCKER_IMAGE:-ghcr.io/nod-ai/manylinux_x86_64@sha256:4acf83343706d1e37252d6001ded3c97a73bc38620580f855b4e65e35ddc5681}" + # TODO(#679): Enable tokenizers by default + SHORTFIN_ENABLE_TOKENIZERS="${SHORTFIN_ENABLE_TOKENIZERS:-OFF}" +else + # TODO: publish a multi-platform manylinux image and include more deps in all platforms (rust, ccache, etc.) + MANYLINUX_DOCKER_IMAGE="${MANYLINUX_DOCKER_IMAGE:-quay.io/pypa/manylinux_2_28_${ARCH}:latest}" + SHORTFIN_ENABLE_TOKENIZERS="${SHORTFIN_ENABLE_TOKENIZERS:-OFF}" +fi + function run_on_host() { echo "Running on host" echo "Launching docker image ${MANYLINUX_DOCKER_IMAGE}" @@ -69,6 +77,7 @@ function run_on_host() { -e "OVERRIDE_PYTHON_VERSIONS=${PYTHON_VERSIONS}" \ -e "OUTPUT_DIR=${OUTPUT_DIR}" \ -e "SHORTFIN_ENABLE_TRACING=${SHORTFIN_ENABLE_TRACING}" \ + -e "SHORTFIN_ENABLE_TOKENIZERS=${SHORTFIN_ENABLE_TOKENIZERS}" \ ${extra_args} \ "${MANYLINUX_DOCKER_IMAGE}" \ -- ${THIS_DIR}/${SCRIPT_NAME}