triton-inference-server / dali_backend

The Triton backend that allows running GPU-accelerated data pre-processing pipelines implemented in DALI's python API.
https://docs.nvidia.com/deeplearning/dali/user-guide/docs/index.html
MIT License
121 stars 28 forks source link

Cannot build dali backend docker #17

Closed HoangTienDuc closed 3 years ago

HoangTienDuc commented 3 years ago

I try to build dali backend docker both on two branch 20.12 and master, but i am stuck at cmake process.

-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- DALI includes dir: /usr/local/lib/python3.6/dist-packages/nvidia/dali/include
-- DALI libs dir: /usr/local/lib/python3.6/dist-packages/nvidia/dali
-- DALI libs: dalidali_kernelsdali_operators
CMake Error at CMakeLists.txt:81 (add_subdirectory):
  The source directory

    /dali/extern/Catch2

  does not contain a CMakeLists.txt file.

-- Configuring incomplete, errors occurred!
See also "/dali/build_in_ci/CMakeFiles/CMakeOutput.log".
See also "/dali/build_in_ci/CMakeFiles/CMakeError.log".
The command '/bin/sh -c mkdir build_in_ci && cd build_in_ci &&     cmake                                                -D CMAKE_BUILD_TYPE=Release                        -D TRITON_DALI_SKIP_DOWNLOAD=ON ..                 -D CMAKE_INSTALL_PREFIX=/opt/tritonserver &&     make -j"$(grep ^processor /proc/cpuinfo | wc -l)" install' returned a non-zero code: 1
szalpal commented 3 years ago

Hello @HoangTienDuc ! Catch2 is a submodule in dali_backend, so you need to clone recursively:

git clone --recursive git@github.com:triton-inference-server/dali_backend.git
          ^^^^^^^^^^^

How to build guide gives you details on building. Please note, that for development dali_backend itself (without the need of building tritonserver), it's more convenient to use supplied Dockerfile.

Edwardmark commented 3 years ago

@szalpal similar error as follows:

RUN mkdir build_in_ci && cd build_in_ci &&     cmake                                                   -D CMAKE_INSTALL_PREFIX=/opt/tritonserver             -D CMAKE_BUILD_TYPE=Release                           -D TRITON_COMMON_REPO_TAG="r$TRITON_VERSION"          -D TRITON_CORE_REPO_TAG="r$TRITON_VERSION"            -D TRITON_BACKEND_REPO_TAG="r$TRITON_VERSION"         .. &&                                               make -j"$(grep ^processor /proc/cpuinfo | wc -l)" install
 ---> Running in 3b5951f51394
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build configuration: Release
Scanning dependencies of target repo-common-populate
[ 11%] Creating directories for 'repo-common-populate'
[ 22%] Performing download step (git clone) for 'repo-common-populate'
Cloning into 'repo-common-src'...
fatal: invalid reference: r
CMake Error at repo-common-subbuild/repo-common-populate-prefix/tmp/repo-common-populate-gitclone.cmake:40 (message):
  Failed to checkout tag: 'r'

make[2]: *** [CMakeFiles/repo-common-populate.dir/build.make:112: repo-common-populate-prefix/src/repo-common-populate-stamp/repo-common-populate-download] Error 1
make[1]: *** [CMakeFiles/Makefile2:96: CMakeFiles/repo-common-populate.dir/all] Error 2
make: *** [Makefile:104: all] Error 2

CMake Error at /usr/local/share/cmake-3.17/Modules/FetchContent.cmake:912 (message):
  Build step for repo-common failed: 2
Call Stack (most recent call first):
  /usr/local/share/cmake-3.17/Modules/FetchContent.cmake:1003 (__FetchContent_directPopulate)
  /usr/local/share/cmake-3.17/Modules/FetchContent.cmake:1044 (FetchContent_Populate)
  CMakeLists.txt:72 (FetchContent_MakeAvailable)

Could you tell me how to deal with it? Thanks.

banasraf commented 3 years ago

@Edwardmark
It looks like the TRITON_VERSION variable is not set. Do you build a container using one of the Dockerfiles available in the repository (docker directory)?

If you run this command in any other way (e.g. custom Dockerfile) you have to set the TRITON_VERSION variable to the version matching your triton server. (latest: 21.05)

Edwardmark commented 3 years ago

@Edwardmark It looks like the TRITON_VERSION variable is not set. Do you build a container using one of the Dockerfiles available in the repository (docker directory)?

If you run this command in any other way (e.g. custom Dockerfile) you have to set the TRITON_VERSION variable to the version matching your triton server. (latest: 21.05)

Thanks.