Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable support for Ubuntu 24.04 #7783

Merged
merged 10 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ ExternalProject_Add(triton-server
-Dre2_DIR:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/re2/${LIB_DIR}/cmake/re2
-Dabsl_DIR:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/absl/${LIB_DIR}/cmake/absl
-DCURL_DIR:STRING=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/curl/${LIB_DIR}/cmake/CURL
-Dnlohmann_json_DIR:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/nlohmann_json/${LIB_DIR}/cmake/nlohmann_json
-Dnlohmann_json_DIR:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/nlohmann_json/share/cmake/nlohmann_json
-DLibevent_DIR:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/libevent/lib/cmake/libevent
-Dlibevhtp_DIR:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/libevhtp/lib/cmake/libevhtp
-Dstorage_client_DIR:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/google-cloud-cpp/${LIB_DIR}/cmake/storage_client
Expand Down
23 changes: 7 additions & 16 deletions Dockerfile.QA
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,19 @@ RUN apt-get update && \
libboost-dev \
python3-dev \
python3-pip \
python3-wheel \
python3-setuptools \
rapidjson-dev \
software-properties-common && \
rm -rf /var/lib/apt/lists/*

RUN pip3 install --upgrade pip && \
pip3 install --upgrade wheel setuptools

RUN apt update -q=2 \
&& apt install -y gpg wget \
&& wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null \
&& . /etc/os-release \
&& echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ $UBUNTU_CODENAME main" | tee /etc/apt/sources.list.d/kitware.list >/dev/null \
&& apt-get update -q=2 \
&& apt-get install -y --no-install-recommends cmake=3.27.7* cmake-data=3.27.7*
&& apt-get install -y --no-install-recommends cmake=3.28.3* cmake-data=3.28.3*

# Add inception_graphdef model to example repo
WORKDIR /workspace/docs/examples/model_repository
Expand Down Expand Up @@ -311,20 +310,12 @@ ARG TARGETPLATFORM
ENV DEBIAN_FRONTEND=noninteractive

# install platform specific packages
RUN if [ $(cat /etc/os-release | grep 'VERSION_ID="20.04"' | wc -l) -ne 0 ]; then \
apt-get update && \
apt-get install -y --no-install-recommends \
libpng-dev; \
elif [ $(cat /etc/os-release | grep 'VERSION_ID="22.04"' | wc -l) -ne 0 ]; then \
apt-get update && \
apt-get install -y --no-install-recommends \
libpng-dev; \
elif [ $(cat /etc/os-release | grep 'VERSION_ID="18.04"' | wc -l) -ne 0 ]; then \
RUN if grep -qE '^VERSION_ID="(18\.04|20\.04|22\.04|24\.04)' /etc/os-release; then \
apt-get update && \
apt-get install -y --no-install-recommends \
libpng-dev; \
else \
echo "Ubuntu version must be either 18.04, 20.04 or 22.04" && \
echo "Ubuntu version must be either 18.04, 20.04, 22.04 or 24.04" && \
exit 1; \
fi

Expand All @@ -345,6 +336,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
python3-dev \
python3-pip \
python3-protobuf \
python3-wheel \
python3-setuptools \
swig \
valgrind && \
Expand All @@ -354,8 +346,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
RUN rm -f /usr/bin/python && \
ln -s /usr/bin/python3 /usr/bin/python

RUN pip3 install --upgrade wheel setuptools && \
pip3 install --upgrade "numpy<2" pillow attrdict future grpcio requests gsutil \
RUN pip3 install --upgrade "numpy<2" pillow attrdict future grpcio requests gsutil \
awscli six grpcio-channelz prettytable virtualenv \
check-jsonschema

Expand Down
20 changes: 11 additions & 9 deletions Dockerfile.sdk
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ARG JAVA_BINDINGS_MAVEN_VERSION=3.8.4
ARG JAVA_BINDINGS_JAVACPP_PRESETS_TAG=1.5.8

# DCGM version to install for Model Analyzer
ARG DCGM_VERSION=3.2.6
ARG DCGM_VERSION=3.3.6

ARG NVIDIA_TRITON_SERVER_SDK_VERSION=unknown
ARG NVIDIA_BUILD_ID=unknown
Expand All @@ -57,6 +57,7 @@ FROM ${BASE_IMAGE} AS sdk_build

# Ensure apt-get won't prompt for selecting options
ENV DEBIAN_FRONTEND=noninteractive
ENV PIP_BREAK_SYSTEM_PACKAGES=1

RUN apt-get update && \
apt-get install -y --no-install-recommends \
Expand All @@ -78,15 +79,15 @@ RUN apt-get update && \
python3 \
python3-pip \
python3-dev \
python3-wheel \
python3-setuptools \
rapidjson-dev \
vim \
wget \
python3-pdfkit \
openjdk-11-jdk \
maven && \
pip3 install --upgrade wheel setuptools && \
pip3 install --upgrade grpcio-tools && \
pip3 install --upgrade pip
pip3 install --upgrade grpcio-tools

# Client build requires recent version of CMake (FetchContent required)
# Using CMAKE installation instruction from:: https://apt.kitware.com/
Expand All @@ -96,7 +97,7 @@ RUN apt update -q=2 \
&& . /etc/os-release \
&& echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ $UBUNTU_CODENAME main" | tee /etc/apt/sources.list.d/kitware.list >/dev/null \
&& apt-get update -q=2 \
&& apt-get install -y --no-install-recommends cmake=3.27.7* cmake-data=3.27.7* \
&& apt-get install -y --no-install-recommends cmake=3.28.3* cmake-data=3.28.3* \
&& cmake --version

# Build expects "python" executable (not python3).
Expand Down Expand Up @@ -183,6 +184,7 @@ FROM ${BASE_IMAGE}

# Ensure apt-get won't prompt for selecting options
ENV DEBIAN_FRONTEND=noninteractive
ENV PIP_BREAK_SYSTEM_PACKAGES=1

ARG DCGM_VERSION
ARG TRITON_REPO_ORGANIZATION
Expand All @@ -205,14 +207,14 @@ RUN apt-get update && \
python3 \
python3-pip \
python3-dev \
python3-wheel \
python3-setuptools \
vim \
wget \
python3-pdfkit \
maven \
default-jdk && \
pip3 install --upgrade wheel setuptools && \
pip3 install --upgrade grpcio-tools && \
pip3 install --upgrade pip
pip3 install --upgrade grpcio-tools

WORKDIR /workspace
COPY TRITON_VERSION .
Expand Down Expand Up @@ -250,7 +252,7 @@ RUN pip3 install install/python/genai_perf-*.whl
RUN if [ "$TRITON_ENABLE_GPU" = "ON" ]; then \
[ "$(uname -m)" != "x86_64" ] && arch="sbsa" || arch="x86_64" && \
curl -o /tmp/cuda-keyring.deb \
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/$arch/cuda-keyring_1.0-1_all.deb \
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/$arch/cuda-keyring_1.1-1_all.deb \
&& apt install /tmp/cuda-keyring.deb && rm /tmp/cuda-keyring.deb && \
apt-get update && apt-get install -y datacenter-gpu-manager=1:${DCGM_VERSION}; \
fi
Expand Down
33 changes: 16 additions & 17 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"1.20.0", # ORT
"2024.4.0", # ORT OpenVINO
"2024.4.0", # Standalone OpenVINO
"3.2.6", # DCGM version
"3.3.6", # DCGM version
"0.5.5", # vLLM version
"3.12.3", # RHEL Python version
)
Expand Down Expand Up @@ -886,7 +886,7 @@ def install_dcgm_libraries(dcgm_version, target_machine):
ENV DCGM_VERSION {}
# Install DCGM. Steps from https://developer.nvidia.com/dcgm#Downloads
RUN curl -o /tmp/cuda-keyring.deb \\
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/sbsa/cuda-keyring_1.0-1_all.deb \\
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/sbsa/cuda-keyring_1.1-1_all.deb \\
&& apt install /tmp/cuda-keyring.deb \\
&& rm /tmp/cuda-keyring.deb \\
&& apt-get update \\
Expand All @@ -899,7 +899,7 @@ def install_dcgm_libraries(dcgm_version, target_machine):
ENV DCGM_VERSION {}
# Install DCGM. Steps from https://developer.nvidia.com/dcgm#Downloads
RUN curl -o /tmp/cuda-keyring.deb \\
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb \\
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb \\
&& apt install /tmp/cuda-keyring.deb \\
&& rm /tmp/cuda-keyring.deb \\
&& apt-get update \\
Expand Down Expand Up @@ -1036,6 +1036,7 @@ def create_dockerfile_buildbase(ddir, dockerfile_name, argmap):
df += """
# Ensure apt-get won't prompt for selecting options
ENV DEBIAN_FRONTEND=noninteractive
ENV PIP_BREAK_SYSTEM_PACKAGES=1

# Install docker docker buildx
RUN apt-get update \\
Expand Down Expand Up @@ -1072,6 +1073,7 @@ def create_dockerfile_buildbase(ddir, dockerfile_name, argmap):
patchelf \\
python3-dev \\
python3-pip \\
python3-wheel \\
python3-setuptools \\
rapidjson-dev \\
scons \\
Expand All @@ -1086,10 +1088,7 @@ def create_dockerfile_buildbase(ddir, dockerfile_name, argmap):
wget \\
&& rm -rf /var/lib/apt/lists/*

RUN pip3 install --upgrade pip \\
&& pip3 install --upgrade \\
wheel \\
setuptools \\
RUN pip3 install --upgrade \\
docker \\
virtualenv

Expand All @@ -1107,7 +1106,7 @@ def create_dockerfile_buildbase(ddir, dockerfile_name, argmap):
&& . /etc/os-release \\
&& echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ $UBUNTU_CODENAME main" | tee /etc/apt/sources.list.d/kitware.list >/dev/null \\
&& apt-get update -q=2 \\
&& apt-get install -y --no-install-recommends cmake=3.27.7* cmake-data=3.27.7*
&& apt-get install -y --no-install-recommends cmake=3.28.3* cmake-data=3.28.3*
"""

if FLAGS.enable_gpu:
Expand Down Expand Up @@ -1245,7 +1244,6 @@ def create_dockerfile_linux(
rm -fr ${TRT_ROOT}/bin ${TRT_ROOT}/targets/${ARCH}-linux-gnu/bin ${TRT_ROOT}/data && \\
rm -fr ${TRT_ROOT}/doc ${TRT_ROOT}/onnx_graphsurgeon ${TRT_ROOT}/python && \\
rm -fr ${TRT_ROOT}/samples ${TRT_ROOT}/targets/${ARCH}-linux-gnu/samples && \\
python3 -m pip install --upgrade pip && \\
pip3 install --no-cache-dir transformers && \\
find /usr -name libtensorrt_llm.so -exec dirname {} \; > /etc/ld.so.conf.d/tensorrt-llm.conf && \\
find /opt/tritonserver -name libtritonserver.so -exec dirname {} \; > /etc/ld.so.conf.d/triton-tensorrtllm-worker.conf && \\
Expand Down Expand Up @@ -1310,6 +1308,7 @@ def dockerfile_prepare_container_linux(argmap, backends, enable_gpu, target_mach
# artifacts copied below are assign to this user.
ENV TRITON_SERVER_USER=triton-server
RUN userdel tensorrt-server > /dev/null 2>&1 || true \\
&& userdel ubuntu > /dev/null 2>&1 || true \\
&& if ! id -u $TRITON_SERVER_USER > /dev/null 2>&1 ; then \\
useradd $TRITON_SERVER_USER; \\
fi \\
Expand Down Expand Up @@ -1356,12 +1355,10 @@ def dockerfile_prepare_container_linux(argmap, backends, enable_gpu, target_mach
libgoogle-perftools-dev \\
libjemalloc-dev \\
libnuma-dev \\
libre2-9 \\
software-properties-common \\
wget \\
{backend_dependencies} \\
python3-pip \\
&& python3 -m pip install --upgrade pip \\
&& rm -rf /var/lib/apt/lists/*
""".format(
backend_dependencies=backend_dependencies
Expand Down Expand Up @@ -1404,7 +1401,8 @@ def dockerfile_prepare_container_linux(argmap, backends, enable_gpu, target_mach
if "python" in backends:
if target_platform() == "rhel":
df += """
# python3 and some pip installs required for the python backend
ENV PIP_BREAK_SYSTEM_PACKAGES=1
# python3, python3-pip and some pip installs required for the python backend
RUN yum install -y \\
libarchive-devel \\
openssl-devel \\
Expand All @@ -1424,16 +1422,17 @@ def dockerfile_prepare_container_linux(argmap, backends, enable_gpu, target_mach
"""
else:
df += """
# python3 and some pip installs required for the python backend
ENV PIP_BREAK_SYSTEM_PACKAGES=1
# python3, python3-pip and some pip installs required for the python backend
RUN apt-get update \\
&& apt-get install -y --no-install-recommends \\
python3 \\
libarchive-dev \\
python3-pip \\
python3-wheel \\
python3-setuptools \\
libpython3-dev \\
&& pip3 install --upgrade pip \\
&& pip3 install --upgrade \\
wheel \\
setuptools \\
\"numpy<2\" \\
virtualenv \\
&& rm -rf /var/lib/apt/lists/*
Expand Down Expand Up @@ -1636,7 +1635,7 @@ def create_build_dockerfiles(
FLAGS.upstream_container_version
)
else:
base_image = "ubuntu:22.04"
base_image = "ubuntu:24.04"

dockerfileargmap = {
"NVIDIA_BUILD_REF": "" if FLAGS.build_sha is None else FLAGS.build_sha,
Expand Down
5 changes: 3 additions & 2 deletions qa/L0_backend_bls/test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# Copyright 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -45,7 +45,7 @@ apt update -q=2 \
&& . /etc/os-release \
&& echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ $UBUNTU_CODENAME main" | tee /etc/apt/sources.list.d/kitware.list >/dev/null \
&& apt-get update -q=2 \
&& apt-get install -y --no-install-recommends cmake=3.27.7* cmake-data=3.27.7* \
&& apt-get install -y --no-install-recommends cmake=3.28.3* cmake-data=3.28.3* \
rapidjson-dev
cmake --version

Expand All @@ -62,6 +62,7 @@ git clone --single-branch --depth=1 -b $TRITON_BACKEND_REPO_TAG \
-DTRITON_BACKEND_REPO_TAG=${TRITON_BACKEND_REPO_TAG} \
-DTRITON_CORE_REPO_TAG=${TRITON_CORE_REPO_TAG} \
-DTRITON_COMMON_REPO_TAG=${TRITON_COMMON_REPO_TAG} \
-DWARNINGS_AS_ERRORS:BOOL=OFF \
.. &&
make -j4 install)

Expand Down
3 changes: 1 addition & 2 deletions qa/L0_backend_fastertransformer/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ RET=0
# install dependencies
apt-get update && \
apt-get install -y --no-install-recommends python3 python3-pip python3-protobuf
python3 -m pip install --upgrade pip && \
pip3 install --upgrade "numpy<2"
pip3 install --upgrade "numpy<2"

# install client libraries
pip3 install tritonclient[all]
Expand Down
2 changes: 1 addition & 1 deletion qa/L0_backend_python/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ install_build_deps() {
&& . /etc/os-release \
&& echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ $UBUNTU_CODENAME main" | tee /etc/apt/sources.list.d/kitware.list >/dev/null \
&& apt-get update -q=2 \
&& apt-get install -y --no-install-recommends cmake=3.27.7* cmake-data=3.27.7*
&& apt-get install -y --no-install-recommends cmake=3.28.3* cmake-data=3.28.3*
}

create_conda_env() {
Expand Down
4 changes: 2 additions & 2 deletions qa/L0_backend_python/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ fi
export REPO_VERSION=$REPO_VERSION
export TEST_JETSON=${TEST_JETSON:=0}
export CUDA_VISIBLE_DEVICES=0
export PYTHON_ENV_VERSION=${PYTHON_ENV_VERSION:="10"}
export PYTHON_ENV_VERSION=${PYTHON_ENV_VERSION:="12"}
export PYTHON_BACKEND_REPO_TAG=$PYTHON_BACKEND_REPO_TAG

BASE_SERVER_ARGS="--model-repository=${MODELDIR}/models --backend-directory=${BACKEND_DIR} --log-verbose=1"
Expand All @@ -78,7 +78,7 @@ source ./common.sh

rm -fr *.log ./models

python3 --version | grep "3.10" > /dev/null
python3 --version | grep "3.12" > /dev/null
if [ $? -ne 0 ]; then
echo -e "Expecting Python default version to be: Python 3.10 but actual version is $(python3 --version)"
exit 1
Expand Down
4 changes: 2 additions & 2 deletions qa/L0_backend_tutorial/test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# Copyright 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -48,7 +48,7 @@ apt update -q=2 \
&& . /etc/os-release \
&& echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ $UBUNTU_CODENAME main" | tee /etc/apt/sources.list.d/kitware.list >/dev/null \
&& apt-get update -q=2 \
&& apt-get install -y --no-install-recommends cmake=3.27.7* cmake-data=3.27.7* \
&& apt-get install -y --no-install-recommends cmake=3.28.3* cmake-data=3.28.3* \
rapidjson-dev
cmake --version

Expand Down
4 changes: 2 additions & 2 deletions qa/L0_batch_custom/test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# Copyright 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -66,7 +66,7 @@ apt update -q=2 \
&& . /etc/os-release \
&& echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ $UBUNTU_CODENAME main" | tee /etc/apt/sources.list.d/kitware.list >/dev/null \
&& apt-get update -q=2 \
&& apt-get install -y --no-install-recommends cmake=3.27.7* cmake-data=3.27.7* rapidjson-dev
&& apt-get install -y --no-install-recommends cmake=3.28.3* cmake-data=3.28.3* rapidjson-dev
cmake --version

# Set up repository
Expand Down
4 changes: 2 additions & 2 deletions qa/L0_client_build_variants/test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# Copyright 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -38,7 +38,7 @@ apt update -q=2 \
&& . /etc/os-release \
&& echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ $UBUNTU_CODENAME main" | tee /etc/apt/sources.list.d/kitware.list >/dev/null \
&& apt-get update -q=2 \
&& apt-get install -y --no-install-recommends cmake=3.27.7* cmake-data=3.27.7*
&& apt-get install -y --no-install-recommends cmake=3.28.3* cmake-data=3.28.3*
cmake --version


Expand Down
Loading
Loading