Skip to content

Commit

Permalink
Changes to support 23.05 (#5782)
Browse files Browse the repository at this point in the history
* Update python and conda version

* Update CMAKE installation

* Update checksum version

* Update ubuntu base image to 22.04

* Use ORT 1.15.0

* Set CMAKE to pull latest version

* Update libre package version

* Removing unused argument

* Adding condition for ubuntu 22.04

* Removing installation of the package from the devel container

* Nnshah1 u22.04 (#5770)

* Update CMAKE installation

* Update python and conda version

* Update CMAKE installation

* Update checksum version

* Update ubuntu base image to 22.04

* updating versions for ubuntu 22.04

* remove re2

---------

Co-authored-by: Neelay Shah <neelays@neelays-dt.nvidia.com>
Co-authored-by: Neelay Shah <neelays@nvidia.com>

* Set ONNX version to 1.13.0

* Fix L0_custom_ops for ubuntu 22.04 (#5775)

* add back rapidjson-dev

---------

Co-authored-by: Neelay Shah <neelays@neelays-dt.nvidia.com>
Co-authored-by: Neelay Shah <neelays@nvidia.com>
Co-authored-by: nv-kmcgill53 <101670481+nv-kmcgill53@users.noreply.github.com>
  • Loading branch information
4 people authored May 12, 2023
1 parent 4f6272d commit 821ab46
Show file tree
Hide file tree
Showing 15 changed files with 109 additions and 104 deletions.
25 changes: 13 additions & 12 deletions Dockerfile.QA
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,15 @@ RUN apt-get update && \
RUN pip3 install --upgrade pip && \
pip3 install --upgrade wheel setuptools

RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | \
gpg --dearmor - | \
tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' && \
RUN apt update && 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 && \
apt-get install -y --no-install-recommends \
cmake-data=3.25.2-0kitware1ubuntu20.04.1 cmake=3.25.2-0kitware1ubuntu20.04.1
apt-get install -y --no-install-recommends cmake cmake-data

# Add inception_graphdef model to example repo
WORKDIR /workspace/docs/examples/model_repository
Expand Down Expand Up @@ -294,12 +296,16 @@ RUN if [ $(cat /etc/os-release | grep 'VERSION_ID="20.04"' | wc -l) -ne 0 ]; the
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 \
apt-get update && \
apt-get install -y --no-install-recommends \
libpng-dev; \
else \
echo "Ubuntu version must be either 18.04 or 20.04" && \
echo "Ubuntu version must be either 18.04, 20.04 or 22.04" && \
exit 1; \
fi

Expand Down Expand Up @@ -333,11 +339,6 @@ RUN pip3 install --upgrade wheel setuptools && \
pip3 install --upgrade numpy pillow attrdict future grpcio requests gsutil \
awscli six grpcio-channelz prettytable virtualenv

# L0_http_fuzz is hitting similar issue with boofuzz with latest version (0.4.0):
# https://github.com/jtpereyda/boofuzz/issues/529
# Hence, fixing the boofuzz version to 0.3.0
RUN pip3 install 'boofuzz==0.3.0'

# go needed for example go client test.
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
wget https://golang.org/dl/go1.19.1.linux-arm64.tar.gz && \
Expand Down
30 changes: 11 additions & 19 deletions Dockerfile.sdk
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ ARG TRITON_CORE_REPO_TAG=main
ARG TRITON_BACKEND_REPO_TAG=main
ARG TRITON_THIRD_PARTY_REPO_TAG=main
ARG TRITON_MODEL_ANALYZER_REPO_TAG=main
ARG CMAKE_UBUNTU_VERSION=20.04
ARG TRITON_ENABLE_GPU=ON
ARG JAVA_BINDINGS_MAVEN_VERSION=3.8.4
ARG JAVA_BINDINGS_JAVACPP_PRESETS_TAG=1.5.8
Expand Down Expand Up @@ -87,25 +86,18 @@ RUN apt-get update && \
pip3 install --upgrade grpcio-tools && \
pip3 install --upgrade pip

ARG CMAKE_UBUNTU_VERSION
# Client build requires recent version of CMake (FetchContent required)
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | \
gpg --dearmor - | \
tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \
if [ "$CMAKE_UBUNTU_VERSION" = "20.04" ]; then \
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' && \
apt-get update && \
apt-get install -y --no-install-recommends \
cmake-data=3.25.2-0kitware1ubuntu20.04.1 cmake=3.25.2-0kitware1ubuntu20.04.1; \
elif [ "$CMAKE_UBUNTU_VERSION" = "18.04" ]; then \
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' && \
apt-get update && \
apt-get install -y --no-install-recommends \
cmake-data=3.18.4-0kitware1 cmake=3.18.4-0kitware1; \
else \
echo "ERROR: Only support CMAKE_UBUNTU_VERSION to be 18.04 or 20.04" && false; \
fi && \
cmake --version
# Using CMAKE installation instruction from:: https://apt.kitware.com/
RUN apt update && 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 && \
apt-get install -y --no-install-recommends cmake cmake-data && \
cmake --version

# Build expects "python" executable (not python3).
RUN rm -f /usr/bin/python && \
Expand Down
26 changes: 14 additions & 12 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@
'2.34.0': (
'23.05', # triton container
'23.05', # upstream container
'1.14.1', # ORT
'1.15.0', # ORT
'2022.1.0', # ORT OpenVINO
'2022.1.0', # Standalone OpenVINO
'2.2.9', # DCGM version
'py38_4.12.0') # Conda version.
'py310_23.1.0-1') # Conda version.
}

CORE_BACKENDS = ['ensemble']
Expand Down Expand Up @@ -845,9 +845,9 @@ def install_miniconda(conda_version, target_machine):
.format(FLAGS.version))
miniconda_url = f"https://repo.anaconda.com/miniconda/Miniconda3-{conda_version}-Linux-{target_machine}.sh"
if target_machine == 'x86_64':
sha_sum = "3190da6626f86eee8abf1b2fd7a5af492994eb2667357ee4243975cdbb175d7a"
sha_sum = "32d73e1bc33fda089d7cd9ef4c1be542616bd8e437d1f77afeeaf7afdb019787"
else:
sha_sum = "0c20f121dc4c8010032d64f8e9b27d79e52d28355eb8d7972eafc90652387777"
sha_sum = "80d6c306b015e1e3b01ea59dc66c676a81fa30279bc2da1f180a7ef7b2191d6e"
return f'''
RUN mkdir -p /opt/
RUN wget "{miniconda_url}" -O miniconda.sh -q && \
Expand Down Expand Up @@ -933,13 +933,15 @@ def create_dockerfile_buildbase(ddir, dockerfile_name, argmap):
mv /tmp/boost_1_80_0/boost /usr/include/boost
# Server build requires recent version of CMake (FetchContent required)
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | \
gpg --dearmor - | \
tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' && \
RUN apt update && 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 && \
apt-get install -y --no-install-recommends \
cmake-data=3.25.2-0kitware1ubuntu20.04.1 cmake=3.25.2-0kitware1ubuntu20.04.1
apt-get install -y --no-install-recommends cmake cmake-data
'''

if FLAGS.enable_gpu:
Expand Down Expand Up @@ -1124,7 +1126,7 @@ def dockerfile_prepare_container_linux(argmap, backends, enable_gpu,
software-properties-common \
libb64-0d \
libcurl4-openssl-dev \
libre2-5 \
libre2-9 \
git \
gperf \
dirmngr \
Expand Down Expand Up @@ -1302,7 +1304,7 @@ def create_build_dockerfiles(container_build_dir, images, backends, repoagents,
base_image = 'nvcr.io/nvidia/tritonserver:{}-py3-min'.format(
FLAGS.upstream_container_version)
else:
base_image = 'ubuntu:20.04'
base_image = 'ubuntu:22.04'

dockerfileargmap = {
'NVIDIA_BUILD_REF':
Expand Down
2 changes: 1 addition & 1 deletion compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ def create_argmap(images, skip_pull):
"nvcr.io/nvidia/tritonserver:{}-cpu-only-py3".format(
FLAGS.container_version),
"min":
"ubuntu:20.04"
"ubuntu:22.04"
}
fail_if(
len(images) < 2,
Expand Down
2 changes: 1 addition & 1 deletion docs/Dockerfile.docs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

FROM ubuntu:20.04
FROM ubuntu:22.04

# various documentation dependencies
RUN apt-get update && \
Expand Down
2 changes: 1 addition & 1 deletion docs/customization_guide/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ building with Docker.
image pulled from [NGC](https://ngc.nvidia.com) that contains the
CUDA, cuDNN, TensorRT and other dependencies that are required to
build Triton. When building without GPU support, the *min* image
is the standard ubuntu:20.04 image.
is the standard ubuntu:22.04 image.

* Run the cmake_build script within the *tritonserver_buildbase*
image to actually build Triton. The cmake_build script performs
Expand Down
21 changes: 12 additions & 9 deletions docs/user_guide/jetson.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,20 @@ pip3 install --upgrade wheel setuptools cython && \
**Note**: OpenCV 4.2.0 is installed as a part of JetPack. It is one of the dependencies for the client build.

**Note**: When building Triton on Jetson, you will require a recent version of cmake.
We recommend using cmake 3.21.1. Below is a script to upgrade your cmake version to 3.21.1.
We recommend using cmake 3.25.2. Below is a script to upgrade your cmake version to 3.25.2.

```
apt remove cmake
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | \
gpg --dearmor - | \
tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' && \
apt-get update && \
apt-get install -y --no-install-recommends \
cmake-data=3.25.2-0kitware1ubuntu20.04.1 cmake=3.25.2-0kitware1ubuntu20.04.1
# Using CMAKE installation instruction from:: https://apt.kitware.com/
apt update && 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 && \
apt-get install -y --no-install-recommends cmake cmake-data
```

### Runtime Dependencies for Triton
Expand All @@ -152,7 +155,7 @@ The following runtime dependencies must be installed before running Triton serve
apt-get update && \
apt-get install -y --no-install-recommends \
libb64-0d \
libre2-5 \
libre2-9 \
libssl1.1 \
rapidjson-dev \
libopenblas-dev \
Expand Down
15 changes: 9 additions & 6 deletions qa/L0_backend_bls/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,16 @@ source ../common/util.sh
RET=0

# Backend build requires recent version of CMake (FetchContent required)
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | \
gpg --dearmor - | \
tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' && \
# Using CMAKE installation instruction from:: https://apt.kitware.com/
apt update && 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 && \
apt-get install -y --no-install-recommends \
cmake-data=3.25.2-0kitware1ubuntu20.04.1 cmake=3.25.2-0kitware1ubuntu20.04.1 \
apt-get install -y --no-install-recommends cmake cmake-data \
rapidjson-dev
cmake --version

Expand Down
19 changes: 11 additions & 8 deletions qa/L0_backend_python/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ get_shm_pages() {

install_conda() {
rm -rf ./miniconda
file_name="Miniconda3-py38_4.9.2-Linux-x86_64.sh"
file_name="Miniconda3-py310_23.1.0-1-Linux-x86_64.sh"
wget https://repo.anaconda.com/miniconda/$file_name

# install miniconda in silent mode
Expand All @@ -43,13 +43,16 @@ install_conda() {

install_build_deps() {
apt update && apt install software-properties-common rapidjson-dev -y
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | \
gpg --dearmor - | \
tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' && \
apt-get update && \
apt-get install -y --no-install-recommends \
cmake-data=3.18.4-0kitware1ubuntu20.04.1 cmake=3.18.4-0kitware1ubuntu20.04.1
# Using CMAKE installation instruction from:: https://apt.kitware.com/
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 && \
apt-get install -y --no-install-recommends cmake cmake-data
}

create_conda_env() {
Expand Down
17 changes: 10 additions & 7 deletions qa/L0_backend_tutorial/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,16 @@ source ../common/util.sh
RET=0

# Client build requires recent version of CMake (FetchContent required)
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | \
gpg --dearmor - | \
tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' && \
apt-get update && \
apt-get install -y --no-install-recommends \
cmake-data=3.25.2-0kitware1ubuntu20.04.1 cmake=3.25.2-0kitware1ubuntu20.04.1 \
# Using CMAKE installation instruction from:: https://apt.kitware.com/
apt update && 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 && \
apt-get install -y --no-install-recommends cmake cmake-data \
rapidjson-dev
cmake --version

Expand Down
16 changes: 9 additions & 7 deletions qa/L0_batch_custom/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,16 @@ source ../common/util.sh
RET=0

# Batch strategy build requires recent version of CMake (FetchContent required)
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | \
gpg --dearmor - | \
tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' && \
# Using CMAKE installation instruction from:: https://apt.kitware.com/
apt update && 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 && \
apt-get install -y --no-install-recommends \
cmake-data=3.25.2-0kitware1ubuntu20.04.1 cmake=3.25.2-0kitware1ubuntu20.04.1 \
rapidjson-dev
apt-get install -y --no-install-recommends cmake cmake-data rapidjson-dev
cmake --version

# Set up repository
Expand Down
18 changes: 11 additions & 7 deletions qa/L0_client_build_variants/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,19 @@ apt-get install -y --no-install-recommends \
rapidjson-dev

# Client build requires recent version of CMake (FetchContent required)
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | \
gpg --dearmor - | \
tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' && \
apt-get update && \
apt-get install -y --no-install-recommends \
cmake-data=3.25.2-0kitware1ubuntu20.04.1 cmake=3.25.2-0kitware1ubuntu20.04.1; \
# Using CMAKE installation instruction from:: https://apt.kitware.com/
apt update && 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 && \
apt-get install -y --no-install-recommends cmake cmake-data
cmake --version


set +e

mkdir -p /workspace/build
Expand Down
2 changes: 1 addition & 1 deletion qa/L0_custom_ops/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ SERVER_ARGS="--model-repository=/data/inferenceserver/${REPO_VERSION}/qa_custom_
# FIXME: Pre-loading the python library system to satisfy the symbol definitions
# as the custom op library is built with different python version within
# pytorch container. See DLIS-4152.
SERVER_LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libpython3.8.so.1:/data/inferenceserver/${REPO_VERSION}/qa_custom_ops/libtorch_custom_ops/libtorch_modulo/custom_modulo.so"
SERVER_LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libpython3.10.so.1:/data/inferenceserver/${REPO_VERSION}/qa_custom_ops/libtorch_custom_ops/libtorch_modulo/custom_modulo.so"
run_server
if [ "$SERVER_PID" == "0" ]; then
echo -e "\n***\n*** Failed to start $SERVER\n***"
Expand Down
2 changes: 1 addition & 1 deletion qa/common/gen_qa_custom_ops
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ nvidia-smi -L || true
nvidia-smi || true
set -e
python3 $SRCDIR/gen_qa_custom_ops_models.py --libtorch --models_dir=$DESTDIR
cp /root/.cache/torch_extensions/py38_cu121/custom_modulo/custom_modulo.so $DESTDIR/libtorch_modulo/.
cp /root/.cache/torch_extensions/py310_cu121//custom_modulo/custom_modulo.so $DESTDIR/libtorch_modulo/.
chmod -R 777 $DESTDIR
EOF

Expand Down
Loading

0 comments on commit 821ab46

Please sign in to comment.