Use my docker here:

  
      
      GitHub
  
  
    

QuantScientist/DarkTorch 8

A low-latency deep learning inference server using pytorch C++ frontend & NVIDIA GPUs.  - QuantScientist/DarkTorch


  
  
    
    
  
  



  
      github.com
  
  
    QuantScientist/DarkTorch/blob/master/docker/cuda10/Dockerfile 2
#FROM nvcr.io/nvidia/tensorrt:19.03-py3
# FROM nvcr.io/nvidia/pytorch:19.07-py3
# FROM nvcr.io/nvidia/pytorch:18.12-py3
FROM nvcr.io/nvidia/pytorch:19.02-py3
# https://github.com/freemanix/torchbuilder/blob/master/Dockerfile

RUN apt-get update &&\
    apt-get install -y sudo git bash


ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:/code/cmake-3.14.3-Linux-x86_64/bin:${PATH}
ENV PYTHONPATH=/opt/conda/lib/python3.6/site-packages/:$PYTHONPATH
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/conda/lib/:/opt/conda/lib/python3.6

RUN apt-get update \
 && apt-get install -y \
    build-essential git gfortran \
    cmake curl wget unzip libreadline-dev libjpeg-dev libpng-dev ncurses-dev \
    imagemagick gnuplot gnuplot-x11 libssl-dev libzmq3-dev graphviz



  This file has been truncated. show original

  
  
    
    
  
  


It resolves the issue. An example is available here:

  
      github.com
  
  
    QuantScientist/DarkTorch/blob/master/001_verify/CMakeLists.txt 11
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)

project(001_verify VERSION 1.2.3.4 LANGUAGES CXX)
set(PROJECT_NAME 001_verify)
set(CMAKE_BUILD_TYPE Release)

if (NOT DEFINED CMAKE_CXX_STANDARD)
    SET(CMAKE_CXX_STANDARD 11)
    SET(CMAKE_CXX_STANDARD_REQUIRED ON)
    set(CMAKE_VERBOSE_MAKEFILE ON)
endif ()
if (CMAKE_CXX_STANDARD LESS 11)
    message(FATAL_ERROR "CMAKE_CXX_STANDARD is less than 11.")
endif ()


set(CXX_RELEASE_FLAGS = -O3 -march=native)

if (CMAKE_SIZEOF_VOID_P EQUAL 8)
    message(STATUS "*** Have SIZEOF void * = 8, so 64-bit")


  This file has been truncated. show original