File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -96,9 +96,11 @@ FetchContent_Declare(
96
96
# RHEL base container has multiple version of Python installed. By default
97
97
# it seems like pybind will pickup v3.6, so we specifically assign it to
98
98
# search for 3.12 here.
99
+ set (RHEL_BUILD OFF )
99
100
if (LINUX )
100
101
file (STRINGS "/etc/os-release" DISTRO_ID_LIKE REGEX "ID_LIKE" )
101
102
if (${DISTRO_ID_LIKE} MATCHES "rhel|centos" )
103
+ set (RHEL_BUILD ON )
102
104
set (PYBIND11_PYTHON_VERSION 3.12 )
103
105
endif (${DISTRO_ID_LIKE} MATCHES "rhel|centos" )
104
106
endif (LINUX )
@@ -278,6 +280,23 @@ target_compile_options(
278
280
)
279
281
target_compile_definitions (triton-python-backend-stub PRIVATE TRITON_PB_STUB )
280
282
283
+ # RHEL assets are not released in a container environment nor do the current
284
+ # Python lib versions in the manylinux base container match those currently
285
+ # available for RHEL8 package managers. Therefore, we package the correct
286
+ # python libs in the backend folder and adjust the stub executable to look
287
+ # in its own folder at runtime.
288
+ if (RHEL_BUILD )
289
+ set_target_properties (
290
+ triton-python-backend-stub
291
+ PROPERTIES
292
+ SKIP_BUILD_RPATH TRUE
293
+ BUILD_WITH_INSTALL_RPATH TRUE
294
+ INSTALL_RPATH_USE_LINK_PATH FALSE
295
+ INSTALL_RPATH "$\{ ORIGIN\} "
296
+ )
297
+ endif (RHEL_BUILD )
298
+
299
+
281
300
# For WIN32 do not link Threads and DL_LIBS
282
301
if (WIN32 )
283
302
target_link_libraries (
You can’t perform that action at this time.
0 commit comments