floydhub / dl-docker

An all-in-one Docker image for deep learning. Contains all the popular DL frameworks (TensorFlow, Theano, Torch, Caffe, etc.)

Home Page:https://www.floydhub.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GPU torch build issues

swigicat opened this issue · comments

I'm trying to compile the GPU docker image. I'm getting the following error during the build process.

Any workaround?

cmake -E make_directory build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/root/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/root/torch/install/lib/luarocks/rocks/optim/1.0.5-0" && make
   
cd build && make install
Updating manifest for /root/torch/install/lib/luarocks/rocks
optim 1.0.5-0 is now built and installed in /root/torch/install/ (license: BSD)

Found CUDA on your machine. Installing CUDA packages
Warning: unmatched variable LUALIB
Building on 4 cores
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- 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
-- 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
-- Found Torch7 in /root/torch/install
-- Found CUDA: /usr/local/cuda (found suitable version "8.0", minimum required is "6.5") 
-- Removing -DNDEBUG from compile flags
-- TH_LIBRARIES: TH
-- MAGMA not found. Compiling without MAGMA support
-- Automatic GPU detection failed. Building for common architectures.
-- Autodetected CUDA architecture(s): 3.0;3.5;5.0;5.2;6.0;6.1;6.1+PTX
-- got cuda version 8.0
-- Found CUDA with FP16 support, compiling with torch.CudaHalfTensor
-- CUDA_NVCC_FLAGS: -gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_52,code=sm_52;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_61,code=compute_61;-DCUDA_HAS_FP16=1
-- THC_SO_VERSION: 0
-- Performing Test HAS_LUAL_SETFUNCS
-- Performing Test HAS_LUAL_SETFUNCS - Failed
-- Configuring done
-- Generating done
-- Build files have been written to: /root/torch/extra/cutorch/build
[  1%] [  3%] [  4%] [  4%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir//./THC_generated_THCSleep.cu.o
Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir//./THC_generated_THCBlas.cu.o
Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir//./THC_generated_THCHalf.cu.o
Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir//./THC_generated_THCReduceApplyUtils.cu.o
[  5%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir//./THC_generated_THCStorage.cu.o
[  6%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir//./THC_generated_THCStorageCopy.cu.o
[  7%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensor.cu.o
[  9%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorCopy.cu.o
[ 10%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorMath.cu.o
[ 11%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorMath2.cu.o
[ 12%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorMathBlas.cu.o
[ 13%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorMathMagma.cu.o
[ 14%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorMathPairwise.cu.o
[ 15%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorMathReduce.cu.o
[ 17%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorMathScan.cu.o
[ 18%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorIndex.cu.o
Segmentation fault (core dumped)
CMake Error at THC_generated_THCTensorMathPairwise.cu.o.cmake:267 (message):
  Error generating file
  /root/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorMathPairwise.cu.o


make[2]: *** [lib/THC/CMakeFiles/THC.dir/./THC_generated_THCTensorMathPairwise.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [lib/THC/CMakeFiles/THC.dir/all] Error 2
make: *** [all] Error 2

jopts=$(getconf _NPROCESSORS_CONF)

echo "Building on $jopts cores"
cmake -E make_directory build && cd build && cmake .. -DLUALIB= -DLUA_INCDIR=/root/torch/install/include -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/root/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/root/torch/install/lib/luarocks/rocks/cutorch/scm-1" && make -j$jopts install


Error: Build error: Failed building.
The command '/bin/sh -c git clone https://github.com/torch/distro.git /root/torch --recursive && 	cd /root/torch && 	bash install-deps && 	yes no | ./install.sh' returned a non-zero code: 1