Skip to content

Commit 79b9ba5

Browse files
dzierDavid Goodwin
andauthored
Build fixes for ubuntu 20.04 (triton-inference-server#7)
Co-authored-by: David Goodwin <[email protected]>
1 parent 7b83c1f commit 79b9ba5

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ if(NOT CMAKE_BUILD_TYPE)
4444
set(CMAKE_BUILD_TYPE Release)
4545
endif()
4646

47+
# Python.h needed by torch headers.
48+
find_package(Python3 REQUIRED COMPONENTS Development)
49+
4750
#
4851
# Dependencies
4952
#
@@ -100,6 +103,7 @@ target_include_directories(
100103
PRIVATE
101104
${CMAKE_CURRENT_SOURCE_DIR}/src
102105
${TRITON_PYTORCH_INCLUDE_PATHS}
106+
${Python3_INCLUDE_DIRS}
103107
)
104108

105109
target_compile_features(triton-pytorch-backend PRIVATE cxx_std_11)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ main Triton [issues page](https://github.com/triton-inference-server/server/issu
5252
Use a recent cmake to build. First install the required dependencies.
5353

5454
```
55-
$ apt-get install patchelf rapidjson-dev python3.6-dev
55+
$ apt-get install patchelf rapidjson-dev python3-dev
5656
```
5757

5858
Copy over the LibTorch and Torchvision headers and libraries from the
@@ -62,7 +62,7 @@ into local directories.
6262
```
6363
$ mkdir build
6464
$ cd build
65-
$ cmake -DCMAKE_INSTALL_PREFIX:PATH=`pwd`/install -DTRITON_PYTORCH_INCLUDE_PATHS="/opt/tritonserver/include/torch;/opt/tritonserver/include/torch/torch/csrc/api/include;/opt/tritonserver/include/torchvision;/usr/include/python3.6" -DTRITON_PYTORCH_LIB_PATHS="/opt/tritonserver/backends/pytorch"..
65+
$ cmake -DCMAKE_INSTALL_PREFIX:PATH=`pwd`/install -DTRITON_PYTORCH_INCLUDE_PATHS="/opt/tritonserver/include/torch;/opt/tritonserver/include/torch/torch/csrc/api/include;/opt/tritonserver/include/torchvision" -DTRITON_PYTORCH_LIB_PATHS="/opt/tritonserver/backends/pytorch"..
6666
$ make install
6767
```
6868

0 commit comments

Comments
 (0)