Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution for CUDA Installation Issues #754

Open
trisongz opened this issue Mar 13, 2020 · 2 comments
Open

Solution for CUDA Installation Issues #754

trisongz opened this issue Mar 13, 2020 · 2 comments

Comments

@trisongz
Copy link

trisongz commented Mar 13, 2020

I noticed there were a few issues regarding CUDA, and I had ran into the same issue while installing on Google Colab.

It's worth noting that there's often multiple versions of CUDA installed when using pre-installed VMs or Containers, and symbolic links may exist that aren't correctly pointing to what nvidia-smi is stating as the driver CUDA version.

In my case, nvidia-smi was showing CUDA version 10.1 while installing apex was trying to use CUDA 10.0, which was symbolically linked to /usr/local/cuda

Here's how I was able to resolve it on Colab-GPU (Linux) with Latest Pytorch with CUDA enabled

# Check Nvidia-smi
nvidia-smi

# Checks which CUDA is Symlinked
ls -al /usr/local/cuda

# Unlinks Symbolic Link
sudo unlink /usr/local/cuda

# Creates New System Link to CUDA 10.1
sudo ln -s /usr/local/cuda-10.1 /usr/local/cuda

# Install APEX based on another issue
sudo pip3 install -v --no-cache-dir --global-option="--pyprof" --global-option="--cpp_ext" --global-option="--cuda_ext" . 

EDIT: installing with --user led to apex package not being found when running code in a notebook

Hope this helps!

@Lornatang
Copy link

@trisongz
Thanks.

@artitw
Copy link

artitw commented Apr 5, 2020

Below works for me on Colab (example):

export CUDA_HOME=/usr/local/cuda-10.1
pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" pytorch-extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants