torch / distro

Torch installation in a self-contained folder
BSD 3-Clause "New" or "Revised" License
555 stars 481 forks source link

./install.sh -> Configuring incomplete, errors occurred! #291

Open Gigimooshi2 opened 4 years ago

Gigimooshi2 commented 4 years ago

So i just ran these three commands:

git clone https://github.com/torch/distro.git ~/torch --recursive cd ~/torch; bash install-deps; ./install.sh

Then i got this error message at my terminal:

Found CUDA on your machine. Installing CUDA packages
Warning: unmatched variable LUALIB

jopts=$(getconf _NPROCESSORS_CONF)

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

Building on 8 cores
-- Found Torch7 in /home/gigi/torch/install
-- Removing -DNDEBUG from compile flags
-- TH_LIBRARIES: TH
-- MAGMA not found. Compiling without MAGMA support
-- Autodetected CUDA architecture(s): 5.0
-- got cuda version 10.2
-- Found CUDA with FP16 support, compiling with torch.CudaHalfTensor
-- CUDA_NVCC_FLAGS: -gencode;arch=compute_50,code=sm_50;-DCUDA_HAS_FP16=1
-- THC_SO_VERSION: 0
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_cublas_device_LIBRARY (ADVANCED)
    linked by target "THC" in directory /home/gigi/torch/extra/cutorch/lib/THC

-- Configuring incomplete, errors occurred!
See also "/home/gigi/torch/extra/cutorch/build/CMakeFiles/CMakeOutput.log".
See also "/home/gigi/torch/extra/cutorch/build/CMakeFiles/CMakeError.log".

Error: Build error: Failed building.

Here's my CMakeError.log https://pastebin.com/KQmtXE3J And here's my CMakeOutput.log https://pastebin.com/1PJ8SZGu

Thanks in advance, if anything else is needed, update me :)

wanna-fly commented 4 years ago

I got the same error, and finally I install it correctly by using these commands instead.

git clone https://github.com/nagadomi/distro.git ~/torch --recursive
cd ~/torch
./install-deps
./clean.sh
./update.sh

see https://github.com/nagadomi/waifu2x/issues/253#issuecomment-445448928 for details.

jainal09 commented 4 years ago

Thank me later! Use this docker file for torch installation! https://github.com/runwayml/alpha_models/blob/master/densecap/Dockerfile