File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,9 @@ if(NOT CMAKE_BUILD_TYPE)
4444  set (CMAKE_BUILD_TYPE  Release)
4545endif ()
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
105109target_compile_features (triton-pytorch-backend PRIVATE  cxx_std_11)
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ main Triton [issues page](https://github.com/triton-inference-server/server/issu
5252Use 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
5858Copy 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
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments