Skip to content
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
1 change: 1 addition & 0 deletions triton-inference-server-toolfile.spec
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ cat << \EOF_TOOLFILE >%i/etc/scram.d/triton-inference-server.xml
<use name="protobuf"/>
<use name="opencv"/>
<use name="grpc"/>
<use name="cuda"/>
</tool>
EOF_TOOLFILE

Expand Down
15 changes: 13 additions & 2 deletions triton-inference-server.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Source: git+https://github.com/%{github_user}/server.git?obj=%{branch}/v%{realversion}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz
BuildRequires: cmake
Requires: opencv protobuf grpc curl python py2-wheel py2-setuptools py2-grpcio-tools python3
Requires: opencv protobuf grpc curl python py2-wheel py2-setuptools py2-grpcio-tools python3 cuda

%prep

Expand All @@ -31,11 +31,17 @@ rm -rf ../build
mkdir ../build
cd ../build

if [ $(%{cuda_gcc_support}) = true ]; then
TRITON_ENABLE_GPU_VALUE=ON
else
TRITON_ENABLE_GPU_VALUE=OFF
fi

cmake ../%{n}-%{realversion}/build/client \
-DCMAKE_INSTALL_PREFIX="%{i}" \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE=Release \
-DTRITON_ENABLE_GPU=OFF \
-DTRITON_ENABLE_GPU=${TRITON_ENABLE_GPU_VALUE} \
-DTRITON_CLIENT_SKIP_EXAMPLES=ON \
-DTRITON_CURL_WITHOUT_CONFIG=ON \
-DCURL_LIBRARY=${CURL_ROOT}/lib/libcurl.so \
Expand All @@ -53,6 +59,11 @@ make %{makeprocesses}
cd ../build
make install

if [ $(%{cuda_gcc_support}) = true ] ; then
# modify header for consistent definition of GPU support
sed -i '/^#ifdef TRITON_ENABLE_GPU/i #define TRITON_ENABLE_GPU' %{i}/include/ipc.h
fi

# extra headers needed
cp src/core/model_config.pb.h %{i}/include/
cp src/core/grpc_service.grpc.pb.h %{i}/include/
Expand Down