Open glenn-jocher opened 5 years ago
Hi @glenn-jocher,
apparently nvcc
wasn't found on your system:
RuntimeError: --cuda_ext was requested, but nvcc was not found. Are you sure your environment has nvcc available? If you're installing within a container from https://hub.docker.com/r/pytorch/pytorch, only images whose names contain 'devel' will provide nvcc.
Running setup.py install for apex ... error
Could you check for a valid CUDA installation on your local machine (docker container) and locate the compiler via which nvcc
?
This should point to a path, where CUDA and nvcc
is installed, e.g. /usr/local/cuda-10.1/bin/nvcc
.
The reason here is that conda does not install nvcc with its cudatoolkit installation. conda's cudatoolkit
is just a subset of Nvidia's nvidia-cuda-toolkit
.
More info on https://stackoverflow.com/questions/56470424/nvcc-missing-when-installing-cudatoolkit
Be careful, however, of installing it them from apt-get, otherwise you might break your dependencies. Currenlty, conda supports cuda10.0 while apt-get installs 10.1. I am currently having that problem and trying to sort it out. Hopefully I find a way to do everything from conda (installing nvcc).
I decided to use a docker container and forget about the problem
I actually have the same problem.
Could you check for a valid CUDA installation
as far as I understand pip install torch
installed my cuda. I tried to install cuda toolkit on top but that broke the graphics driver...
Lets say I start with a freshly installed Ubuntu 16.04 + miniconda + pytorch Whats the minimum invasive to install nvcc and get apex running?
Edit What worked for me at the end was installing the cudatoolkit only (without graphics driver)
wget http://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_418.87.00_linux.run
sudo sh cuda_10.1.243_418.87.00_linux.run --silent --toolkit
echo "export PATH=/usr/local/cuda-10.1/bin:/usr/local/cuda-10.1/NsightCompute-2019.1${PATH:+:${PATH}}" >> .bashrc
echo "export LD_LIBRARY_PATH=/usr/local/cuda-10.1/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}" >> .bashrc
rm cuda_10.1.243_418.87.00_linux.run
I actually have the same problem.
Could you check for a valid CUDA installation
as far as I understand
pip install torch
installed my cuda. I tried to install cuda toolkit on top but that broke the graphics driver...Lets say I start with a freshly installed Ubuntu 16.04 + miniconda + pytorch Whats the minimum invasive to install nvcc and get apex running?
Edit What worked for me at the end was installing the cudatoolkit only (without graphics driver)
wget http://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_418.87.00_linux.run sudo sh cuda_10.1.243_418.87.00_linux.run --silent --toolkit echo "export PATH=/usr/local/cuda-10.1/bin:/usr/local/cuda-10.1/NsightCompute-2019.1${PATH:+:${PATH}}" >> .bashrc echo "export LD_LIBRARY_PATH=/usr/local/cuda-10.1/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}" >> .bashrc rm cuda_10.1.243_418.87.00_linux.run
Many thanks to your great advice! In my case, I use CUDA toolkit 10.0. Therefore I modified your link to
wget https://developer.nvidia.com/compute/cuda/10.0/Prod/local_installers/cuda_10.0.130_410.48_linux
@ChristofHenkel many thanks!
For those of you who needs cuda 11.1
cd
wget https://developer.download.nvidia.com/compute/cuda/11.1.0/local_installers/cuda_11.1.0_455.23.05_linux.run
sudo sh cuda_11.1.0_455.23.05_linux.run --silent --toolkit
echo "export PATH=/usr/local/cuda-11.1/bin:/usr/local/cuda-11.1/nsight-compute-2020.2.0${PATH:+:${PATH}}" >> .zshrc
echo "export LD_LIBRARY_PATH=/usr/local/cuda-11.2/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}" >> .zshrc
rm cuda_11.1.0_455.23.05_linux.run
Btw I use zsh so it's .zshrc
for me. Change it to .bashrc
if you bash is your default shell.
Hi, In my conda environment I have cuda 11.1, so I was trying to follow @tae898 suggestion. But I get the following error, saying that my gcc version is incompatible, I’m using ubuntu 22.04, which by default uses gcc 11.2.0:
[ERROR]: unsupported compiler version: 11.2.0. Use --override to override this check.
/usr/local/cuda-11.1/include/crt/host_config.h:139:2: error: #error -- unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag ‘-allow-unsupported-compiler’ can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
Could someone please give me some help or guidance? thanks
Additional info of my system: cudatoolkit=11.1.74=h6bb024c_0 nvidia-smi output: | NVIDIA-SMI 515.43.04 Driver Version: 515.43.04 CUDA Version: 11.7
I get this error when trying to install on Ubuntu with PyTorch 1.2.0 and CUDA 10.1. PyTorch recognizes and uses the GPUs correctly. I installed PyTorch using
conda install -yc pytorch pytorch
. Please help, thank you!