This is an automated email from the ASF dual-hosted git repository. tqchen pushed a commit to branch manylinux-ci-836 in repository https://gitbox.apache.org/repos/asf/tvm-tirx.git
commit 7f7884abb6d51e64351f81ee51fed5425d262279 Author: Tianqi Chen <[email protected]> AuthorDate: Sun Oct 25 02:44:08 2026 +0000 Use stock manylinux images for CPU and CUDA CI --- ci/jenkins/common.groovy | 2 +- ci/jenkins/docker-images.ini | 6 +++-- ci/jenkins/gpu_jenkinsfile.groovy | 8 +++--- ci/jenkins/scripts/determine_docker_images.py | 4 +-- docker/bash.sh | 34 +++++++++++++++--------- tests/scripts/task_build_gpu_other.sh | 2 ++ tests/scripts/task_install_build_dependencies.sh | 7 +++++ tests/scripts/test_task_install_dist_wheels.sh | 7 +++++ 8 files changed, 49 insertions(+), 21 deletions(-) diff --git a/ci/jenkins/common.groovy b/ci/jenkins/common.groovy index f994d6cae..e5a1f74f2 100644 --- a/ci/jenkins/common.groovy +++ b/ci/jenkins/common.groovy @@ -19,7 +19,7 @@ import org.jenkinsci.plugins.pipeline.modeldefinition.Utils // ------ Config ------ // Keep image names aligned with docker-images.ini. Tags are resolved in prepare. -image_platforms = [ci_arm: 'ARM', ci_cpu: 'CPU', ci_gpu: 'GPU'] +image_platforms = [ci_arm: 'ARM', ci_cpu: 'CPU', ci_gpu: 'GPU', ci_gpu_tools: 'GPU'] // Resolve Hub inputs through the caller account ECR cache; false keeps public names. enable_docker_hub_cache = true max_time = 180 diff --git a/ci/jenkins/docker-images.ini b/ci/jenkins/docker-images.ini index fbd96a177..21c35c7a8 100644 --- a/ci/jenkins/docker-images.ini +++ b/ci/jenkins/docker-images.ini @@ -19,5 +19,7 @@ [jenkins] ci_tag: 20260705-142349-cfb98e93 ci_arm: tlcpack/ci-arm:%(ci_tag)s -ci_cpu: tlcpack/ci-cpu:%(ci_tag)s -ci_gpu: tlcpack/ci-gpu:%(ci_tag)s +ci_cpu: quay.io/pypa/manylinux_2_28_x86_64:latest +ci_gpu: quay.io/manylinux_cuda/manylinux_2_28_x86_64_cuda13_1:latest +# Keep native ROCm/Vulkan/OpenCL and Doxygen coverage on the existing image. +ci_gpu_tools: tlcpack/ci-gpu:%(ci_tag)s diff --git a/ci/jenkins/gpu_jenkinsfile.groovy b/ci/jenkins/gpu_jenkinsfile.groovy index 081f346a0..6461c0ded 100644 --- a/ci/jenkins/gpu_jenkinsfile.groovy +++ b/ci/jenkins/gpu_jenkinsfile.groovy @@ -34,6 +34,7 @@ stage('Build') { withEnv(ci.build_environment()) { sh( script: """${docker_run} --no-gpu ${images.ci_gpu} bash -euo pipefail -c ' + sudo dnf -y install cuda-driver-devel-13-1 source ./tests/scripts/task_install_build_dependencies.sh ./tests/scripts/task_build_gpu.sh '""", @@ -44,9 +45,10 @@ stage('Build') { // Check the compiler-only GPU configuration after publishing the test build. sh 'rm -rf build' + ci.docker_init(images.ci_gpu_tools) withEnv(ci.build_environment()) { sh( - script: "${docker_run} --no-gpu ${images.ci_gpu} ./tests/scripts/task_build_gpu_other.sh", + script: "${docker_run} --no-gpu ${images.ci_gpu_tools} ./tests/scripts/task_build_gpu_other.sh", label: 'Build gpu_other', ) } @@ -75,10 +77,10 @@ parallel( stage('Docs') { ci.with_node(instance: 'CPU-SPOT', retry_instance: 'CPU', name: 'Docs', folder: 'tvm/tirx-docs', variables: ['PLATFORM=gpu']) { - ci.docker_init(images.ci_gpu) + ci.docker_init(images.ci_gpu_tools) ci.download_artifacts('gpu') sh( - script: "${docker_run} --no-gpu ${images.ci_gpu} ./tests/scripts/task_python_docs.sh", + script: "${docker_run} --no-gpu ${images.ci_gpu_tools} ./tests/scripts/task_python_docs.sh", label: 'Build TIRx API documentation', ) ci.upload_artifacts('docs', '--path docs.tgz') diff --git a/ci/jenkins/scripts/determine_docker_images.py b/ci/jenkins/scripts/determine_docker_images.py index 3fe8c87fb..12a0f9784 100755 --- a/ci/jenkins/scripts/determine_docker_images.py +++ b/ci/jenkins/scripts/determine_docker_images.py @@ -137,8 +137,8 @@ if __name__ == "__main__": name_dir.mkdir(exist_ok=True) images_to_use = {} for filename, spec in images.items(): - if spec.startswith(TVM_CI_ECR): - logging.info(f"{spec} is from ECR") + if spec.startswith((TVM_CI_ECR, "quay.io/")): + logging.info(f"{spec} uses its explicit registry") images_to_use[filename] = spec elif image_exists(spec): logging.info(f"{spec} found in tlcpack") diff --git a/docker/bash.sh b/docker/bash.sh index bcf6e382e..375ab3503 100755 --- a/docker/bash.sh +++ b/docker/bash.sh @@ -591,19 +591,27 @@ else rm /this_is_writable_file_system fi -getent group "${CI_BUILD_GID}" || ( - # Ensure "${CI_BUILD_GROUP}" is not already some other gid inside container. - if grep -q "^${CI_BUILD_GROUP}:" /etc/group; then - CI_BUILD_GROUP="${CI_BUILD_GROUP}2" - fi - addgroup --force-badname --gid "${CI_BUILD_GID}" "${CI_BUILD_GROUP}" >/dev/null) - -getent group tvm-venv || (addgroup tvm-venv >/dev/null) -getent passwd "${CI_BUILD_UID}" || adduser --force-badname --gid "${CI_BUILD_GID}" --uid "${CI_BUILD_UID}" \ - --gecos "${CI_BUILD_USER} (generated by with_the_same_user script)" \ - --disabled-password --home "${CI_BUILD_HOME}" --quiet "${CI_BUILD_USER}" -usermod -a -G sudo -G tvm-venv "${CI_BUILD_USER}" -usermod -a -G sudo -G dialout "${CI_BUILD_USER}" +if command -v addgroup >/dev/null; then + getent group "${CI_BUILD_GID}" || ( + # Ensure "${CI_BUILD_GROUP}" is not already some other gid inside container. + if grep -q "^${CI_BUILD_GROUP}:" /etc/group; then + CI_BUILD_GROUP="${CI_BUILD_GROUP}2" + fi + addgroup --force-badname --gid "${CI_BUILD_GID}" "${CI_BUILD_GROUP}" >/dev/null) + + getent group tvm-venv || (addgroup tvm-venv >/dev/null) + getent passwd "${CI_BUILD_UID}" || adduser --force-badname --gid "${CI_BUILD_GID}" --uid "${CI_BUILD_UID}" \ + --gecos "${CI_BUILD_USER} (generated by with_the_same_user script)" \ + --disabled-password --home "${CI_BUILD_HOME}" --quiet "${CI_BUILD_USER}" + usermod -a -G sudo -G tvm-venv "${CI_BUILD_USER}" + usermod -a -G sudo -G dialout "${CI_BUILD_USER}" +else + # Stock manylinux images use the shadow-utils commands, not Debian adduser. + dnf -y install sudo + getent group "${CI_BUILD_GID}" || groupadd --gid "${CI_BUILD_GID}" "${CI_BUILD_GROUP}" + getent passwd "${CI_BUILD_UID}" || useradd --gid "${CI_BUILD_GID}" --uid "${CI_BUILD_UID}" \ + --home-dir "${CI_BUILD_HOME}" --create-home "${CI_BUILD_USER}" +fi # Add user to video group for ROCm if [[ ! -z "${ROCM_ENABLED-}" ]]; then diff --git a/tests/scripts/task_build_gpu_other.sh b/tests/scripts/task_build_gpu_other.sh index caa9dcd58..33f548e25 100755 --- a/tests/scripts/task_build_gpu_other.sh +++ b/tests/scripts/task_build_gpu_other.sh @@ -22,6 +22,8 @@ set -euxo pipefail # Keep these libraries separate from the published GPU wheel artifacts. unset PYTHONPATH TVM_LIBRARY_PATH TVM_FFI_LIBRARY_PATH TVM_TIRX_LIBRARY_PATH export PYTHONNOUSERSITE=1 +# This native-toolchain image has a different interpreter from the CUDA build. +uv venv --clear --python "$(command -v python3)" source .venv/bin/activate uv sync --only-group build uv pip install --no-deps --offline --reinstall dist/apache_tvm_ffi-*.whl diff --git a/tests/scripts/task_install_build_dependencies.sh b/tests/scripts/task_install_build_dependencies.sh index 0beed707f..83fe0c16d 100755 --- a/tests/scripts/task_install_build_dependencies.sh +++ b/tests/scripts/task_install_build_dependencies.sh @@ -18,6 +18,13 @@ set -euxo pipefail +# Use the bundled interpreter/toolchain in stock manylinux images. +if [ -d /opt/python/cp310-cp310 ]; then + export PATH="/opt/python/cp310-cp310/bin:/opt/rh/gcc-toolset-14/root/usr/bin:/usr/local/cuda/bin:$HOME/.local/bin:$PATH" + export CC=gcc CXX=g++ + python3 -m pip install --user uv +fi + rm -rf dist unset PYTHONPATH TVM_LIBRARY_PATH TVM_FFI_LIBRARY_PATH TVM_TIRX_LIBRARY_PATH export PYTHONNOUSERSITE=1 diff --git a/tests/scripts/test_task_install_dist_wheels.sh b/tests/scripts/test_task_install_dist_wheels.sh index 0ccbe1c92..a2dbb82d1 100755 --- a/tests/scripts/test_task_install_dist_wheels.sh +++ b/tests/scripts/test_task_install_dist_wheels.sh @@ -18,6 +18,13 @@ set -euxo pipefail +# Use the bundled interpreter/toolchain in stock manylinux images. +if [ -d /opt/python/cp310-cp310 ]; then + export PATH="/opt/python/cp310-cp310/bin:/opt/rh/gcc-toolset-14/root/usr/bin:/usr/local/cuda/bin:$HOME/.local/bin:$PATH" + export CC=gcc CXX=g++ + python3 -m pip install --user uv +fi + unset PYTHONPATH TVM_LIBRARY_PATH TVM_FFI_LIBRARY_PATH TVM_TIRX_LIBRARY_PATH export PYTHONNOUSERSITE=1 uv venv --clear --python "$(command -v python3)"
