[TRTLLM-8669][infra] Use artifactory mirror for install python (#8394)

Signed-off-by: ZhanruiSunCh <184402041+ZhanruiSunCh@users.noreply.github.com>
Signed-off-by: Zhanrui Sun <184402041+ZhanruiSunCh@users.noreply.github.com>
Signed-off-by: Yanchao Lu <yanchaol@nvidia.com>
Co-authored-by: Yanchao Lu <yanchaol@nvidia.com>
This commit is contained in:
Zhanrui Sun 2025-10-20 12:17:10 +08:00 committed by GitHub
parent ec32711b1e
commit 8124a62b74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 24 additions and 6 deletions

View File

@ -64,7 +64,7 @@ RUN TRT_VER=${TRT_VER} \
CUBLAS_VER=${CUBLAS_VER} \
bash ./install.sh --tensorrt && rm install_tensorrt.sh
RUN bash ./install.sh --polygraphy && rm install_polygraphy.sh
RUN GITHUB_MIRROR=${GITHUB_MIRROR} bash ./install.sh --polygraphy && rm install_polygraphy.sh
RUN GITHUB_MIRROR=${GITHUB_MIRROR} bash ./install.sh --mpi4py && rm install_mpi4py.sh
@ -93,11 +93,11 @@ RUN if [ -f /etc/redhat-release ]; then \
# Install UCX first
COPY docker/common/install_ucx.sh install_ucx.sh
RUN bash ./install_ucx.sh && rm install_ucx.sh
RUN GITHUB_MIRROR=${GITHUB_MIRROR} bash ./install_ucx.sh && rm install_ucx.sh
# Install NIXL
COPY docker/common/install_nixl.sh install_nixl.sh
RUN bash ./install_nixl.sh && rm install_nixl.sh
RUN GITHUB_MIRROR=${GITHUB_MIRROR} bash ./install_nixl.sh && rm install_nixl.sh
# Install etcd
COPY docker/common/install_etcd.sh install_etcd.sh

View File

@ -116,7 +116,7 @@ fi
if [ $polygraphy -eq 1 ]; then
echo "Installing Polygraphy..."
bash $SCRIPT_DIR/install_polygraphy.sh
GITHUB_MIRROR=$GITHUB_MIRROR bash $SCRIPT_DIR/install_polygraphy.sh
fi
if [ $mpi4py -eq 1 ]; then

View File

@ -5,6 +5,7 @@ set -ex
GITHUB_URL="https://github.com"
if [ -n "${GITHUB_MIRROR}" ]; then
GITHUB_URL=${GITHUB_MIRROR}
export PIP_INDEX_URL="https://urm.nvidia.com/artifactory/api/pypi/pypi-remote/simple"
fi
set_bash_env() {
@ -83,6 +84,9 @@ install_python_rockylinux() {
PYTHON_VERSION=$1
PYTHON_MAJOR="3"
PYTHON_URL="https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz"
if [ -n "${GITHUB_MIRROR}" ]; then
PYTHON_URL="https://urm.nvidia.com/artifactory/api/vcs/downloadTag/vcs-remote/python/cpython/v${PYTHON_VERSION}?ext=tar.gz"
fi
dnf makecache --refresh
dnf install \
epel-release \
@ -103,6 +107,9 @@ install_python_rockylinux() {
-y
echo "Installing Python ${PYTHON_VERSION}..."
curl -L ${PYTHON_URL} | tar -zx -C /tmp
if [ -n "${GITHUB_MIRROR}" ]; then
mv /tmp/cpython-${PYTHON_VERSION} /tmp/Python-${PYTHON_VERSION}
fi
cd /tmp/Python-${PYTHON_VERSION}
bash -c "./configure --enable-shared --prefix=/opt/python/${PYTHON_VERSION} --enable-ipv6 \
LDFLAGS=-Wl,-rpath=/opt/python/${PYTHON_VERSION}/lib,--disable-new-dtags && make -j$(nproc) && make install"

View File

@ -15,7 +15,12 @@ if [ "$(uname -m)" != "amd64" ] && [ "$(uname -m)" != "x86_64" ]; then
GDS_PATH="$CUDA_PATH/targets/sbsa-linux"
fi
if [ -n "${GITHUB_MIRROR}" ]; then
export PIP_INDEX_URL="https://urm.nvidia.com/artifactory/api/pypi/pypi-remote/simple"
export NIXL_REPO="https://gitlab-master.nvidia.com/ftp/GitHubSync/nixl.git"
fi
pip3 install --no-cache-dir meson ninja pybind11
git clone --depth 1 -b ${NIXL_VERSION} ${NIXL_REPO}
cd nixl

View File

@ -2,6 +2,9 @@
set -ex
if [ -n "${GITHUB_MIRROR}" ]; then
export PIP_INDEX_URL="https://urm.nvidia.com/artifactory/api/pypi/pypi-remote/simple"
fi
pip3 install polygraphy==0.49.9
# Clean up pip cache and temporary files

View File

@ -145,7 +145,7 @@ install_tensorrt() {
/usr/local/tensorrt/lib/libnvinfer_dispatch_static.a \
/usr/local/tensorrt/lib/libnvinfer_lean_static.a \
/usr/local/tensorrt/lib/libnvonnxparser_static.a \
/usr/local/tensorrt/lib/libnvinfer_builder_resource_win.so.10.10.0
/usr/local/tensorrt/lib/libnvinfer_builder_resource_win.so.*
}
# Install base packages depending on the base OS

View File

@ -1,12 +1,15 @@
#!/bin/bash
set -ex
GITHUB_URL="https://github.com"
UCX_VERSION="v1.19.x"
UCX_INSTALL_PATH="/usr/local/ucx/"
CUDA_PATH="/usr/local/cuda"
UCX_REPO="https://github.com/openucx/ucx.git"
if [ -n "${GITHUB_MIRROR}" ]; then
export UCX_REPO="https://gitlab-master.nvidia.com/ftp/GitHubSync/ucx.git"
fi
rm -rf ${UCX_INSTALL_PATH}
git clone --depth 1 -b ${UCX_VERSION} ${UCX_REPO}
cd ucx