Skip to content

Commit b52bb72

Browse files
nv-kmcgill53fpetrini15
authored andcommitted
confirmed protobuf cmake error from non-contianer build
More general capture of Linux Distros tritonserver compiling except for --filesystem=gcs and --filesystem=s3 adding sbsa installation for dcgm updating RUNPATH directory for tritonserver executable cleanup removed build_ubuntu and updated build.py
1 parent e6a4984 commit b52bb72

File tree

1 file changed

+103
-1
lines changed

1 file changed

+103
-1
lines changed

build.py

+103-1
Original file line numberDiff line numberDiff line change
@@ -1107,6 +1107,102 @@ def create_dockerfile_buildbase_rhel(ddir, dockerfile_name, argmap):
11071107
with open(os.path.join(ddir, dockerfile_name), "w") as dfile:
11081108
dfile.write(df)
11091109

1110+
def create_dockerfile_buildbase_rhel(ddir, dockerfile_name, argmap):
1111+
df = """
1112+
ARG TRITON_VERSION={}
1113+
ARG TRITON_CONTAINER_VERSION={}
1114+
ARG BASE_IMAGE={}
1115+
""".format(
1116+
argmap["TRITON_VERSION"],
1117+
argmap["TRITON_CONTAINER_VERSION"],
1118+
argmap["BASE_IMAGE"],
1119+
)
1120+
1121+
df += """
1122+
FROM ${BASE_IMAGE}
1123+
1124+
ARG TRITON_VERSION
1125+
ARG TRITON_CONTAINER_VERSION
1126+
"""
1127+
df += """
1128+
# Install docker docker buildx
1129+
RUN yum install -y ca-certificates curl gnupg yum-utils \\
1130+
&& yum-config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo \\
1131+
&& yum install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
1132+
# && yum install -y docker.io docker-buildx-plugin
1133+
1134+
# libcurl4-openSSL-dev is needed for GCS
1135+
# python3-dev is needed by Torchvision
1136+
# python3-pip and libarchive-dev is needed by python backend
1137+
# libxml2-dev is needed for Azure Storage
1138+
# scons is needed for armnn_tflite backend build dep
1139+
RUN yum install -y \\
1140+
ca-certificates \\
1141+
autoconf \\
1142+
automake \\
1143+
git \\
1144+
gperf \\
1145+
re2-devel \\
1146+
openssl-devel \\
1147+
libtool \\
1148+
libcurl-devel \\
1149+
libb64-devel \\
1150+
gperftools-devel \\
1151+
patchelf \\
1152+
python3.11-devel \\
1153+
python3-pip \\
1154+
python3-setuptools \\
1155+
rapidjson-devel \\
1156+
python3-scons \\
1157+
pkg-config \\
1158+
unzip \\
1159+
wget \\
1160+
zlib-devel \\
1161+
libarchive-devel \\
1162+
libxml2-devel \\
1163+
numactl-devel \\
1164+
wget
1165+
1166+
RUN pip3 install --upgrade pip \\
1167+
&& pip3 install --upgrade \\
1168+
wheel \\
1169+
setuptools \\
1170+
docker \\
1171+
virtualenv
1172+
1173+
# Install boost version >= 1.78 for boost::span
1174+
# Current libboost-dev apt packages are < 1.78, so install from tar.gz
1175+
RUN wget -O /tmp/boost.tar.gz \\
1176+
https://archives.boost.io/release/1.80.0/source/boost_1_80_0.tar.gz \\
1177+
&& (cd /tmp && tar xzf boost.tar.gz) \\
1178+
&& mv /tmp/boost_1_80_0/boost /usr/include/boost
1179+
1180+
# Server build requires recent version of CMake (FetchContent required)
1181+
# Might not need this if the installed version of cmake is high enough for our build.
1182+
# RUN apt update -q=2 \\
1183+
# && apt install -y gpg wget \\
1184+
# && 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 \\
1185+
# && . /etc/os-release \\
1186+
# && 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 \\
1187+
# && apt-get update -q=2 \\
1188+
# && apt-get install -y --no-install-recommends cmake=3.27.7* cmake-data=3.27.7*
1189+
"""
1190+
if FLAGS.enable_gpu:
1191+
df += install_dcgm_libraries(argmap["DCGM_VERSION"], target_machine())
1192+
df += """
1193+
ENV TRITON_SERVER_VERSION ${TRITON_VERSION}
1194+
ENV NVIDIA_TRITON_SERVER_VERSION ${TRITON_CONTAINER_VERSION}
1195+
"""
1196+
1197+
df += """
1198+
WORKDIR /workspace
1199+
RUN rm -fr *
1200+
COPY . .
1201+
ENTRYPOINT []
1202+
"""
1203+
1204+
with open(os.path.join(ddir, dockerfile_name), "w") as dfile:
1205+
dfile.write(df)
11101206

11111207
def create_dockerfile_buildbase(ddir, dockerfile_name, argmap):
11121208
df = """
@@ -1264,6 +1360,10 @@ def create_dockerfile_cibase(ddir, dockerfile_name, argmap):
12641360
with open(os.path.join(ddir, dockerfile_name), "w") as dfile:
12651361
dfile.write(df)
12661362

1363+
def create_dockerfile_rhel(
1364+
ddir, dockerfile_name, argmap, backends, repoagents, caches, endpoints
1365+
):
1366+
pass
12671367

12681368
def create_dockerfile_rhel(
12691369
ddir, dockerfile_name, argmap, backends, repoagents, caches, endpoints
@@ -1939,8 +2039,10 @@ def core_build(
19392039
os.path.join(repo_install_dir, "bin", "tritonserver.dll"),
19402040
os.path.join(install_dir, "bin"),
19412041
)
2042+
elif target_platform() == "rhel":
2043+
cmake_script.mkdir(os.path.join(install_dir, "bin"))
19422044
cmake_script.cp(
1943-
os.path.join(repo_install_dir, "lib", "tritonserver.lib"),
2045+
os.path.join(repo_install_dir, "bin", "tritonserver"),
19442046
os.path.join(install_dir, "bin"),
19452047
)
19462048
elif target_platform() == "rhel":

0 commit comments

Comments
 (0)