@@ -1107,6 +1107,102 @@ def create_dockerfile_buildbase_rhel(ddir, dockerfile_name, argmap):
1107
1107
with open (os .path .join (ddir , dockerfile_name ), "w" ) as dfile :
1108
1108
dfile .write (df )
1109
1109
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 )
1110
1206
1111
1207
def create_dockerfile_buildbase (ddir , dockerfile_name , argmap ):
1112
1208
df = """
@@ -1264,6 +1360,10 @@ def create_dockerfile_cibase(ddir, dockerfile_name, argmap):
1264
1360
with open (os .path .join (ddir , dockerfile_name ), "w" ) as dfile :
1265
1361
dfile .write (df )
1266
1362
1363
+ def create_dockerfile_rhel (
1364
+ ddir , dockerfile_name , argmap , backends , repoagents , caches , endpoints
1365
+ ):
1366
+ pass
1267
1367
1268
1368
def create_dockerfile_rhel (
1269
1369
ddir , dockerfile_name , argmap , backends , repoagents , caches , endpoints
@@ -1939,8 +2039,10 @@ def core_build(
1939
2039
os .path .join (repo_install_dir , "bin" , "tritonserver.dll" ),
1940
2040
os .path .join (install_dir , "bin" ),
1941
2041
)
2042
+ elif target_platform () == "rhel" :
2043
+ cmake_script .mkdir (os .path .join (install_dir , "bin" ))
1942
2044
cmake_script .cp (
1943
- os .path .join (repo_install_dir , "lib " , "tritonserver.lib " ),
2045
+ os .path .join (repo_install_dir , "bin " , "tritonserver" ),
1944
2046
os .path .join (install_dir , "bin" ),
1945
2047
)
1946
2048
elif target_platform () == "rhel" :
0 commit comments