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

Install nvcc without root #392

Closed
zc-alexfan opened this issue Jun 9, 2019 · 3 comments
Closed

Install nvcc without root #392

zc-alexfan opened this issue Jun 9, 2019 · 3 comments

Comments

@zc-alexfan
Copy link

zc-alexfan commented Jun 9, 2019

❓ Questions & Help

The instruction specifies that we have to make sure nvcc and CUDA paths are correct:

$ PATH=/usr/local/cuda/bin:$PATH
$ echo $PATH
>>> /usr/local/cuda/bin:...

$ CPATH=/usr/local/cuda/include:$CPATH
$ echo $CPATH
>>> /usr/local/cuda/include:...

$ echo $LD_LIBRARY_PATH
>>> /usr/local/cuda/lib64

(I am new to CUDA toolkits) Since I am using a server, I don't have access to root. However, I am able to install PyTorch 1.1 with CUDA Toolkit 9 using Conda. Are those installations shipped with nvcc and CUDA as required by the PyG installation?

If so, where can I find those paths? I tried to echo the above path variables, but none of them contain the folder or bin as shown above.

Thanks in advanced!

@zc-alexfan
Copy link
Author

Additional information

I tried to skip the paths setup and run pip installs. The installation was complete, but imports are breaking:

Python 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch_geometric
>>> import torch_geometric.nn as nn
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/scratch/alex/anaconda3/envs/pose3.6/lib/python3.6/site-packages/torch_geometric/nn/__init__.py", line 2, in <module>
    from .data_parallel import DataParallel
  File "/scratch/alex/anaconda3/envs/pose3.6/lib/python3.6/site-packages/torch_geometric/nn/data_parallel.py", line 5, in <module>
    from torch_geometric.data import Batch
  File "/scratch/alex/anaconda3/envs/pose3.6/lib/python3.6/site-packages/torch_geometric/data/__init__.py", line 1, in <module>
    from .data import Data
  File "/scratch/alex/anaconda3/envs/pose3.6/lib/python3.6/site-packages/torch_geometric/data/data.py", line 4, in <module>
    from torch_geometric.utils import (contains_isolated_nodes,
  File "/scratch/alex/anaconda3/envs/pose3.6/lib/python3.6/site-packages/torch_geometric/utils/__init__.py", line 2, in <module>
    from .scatter import scatter_
  File "/scratch/alex/anaconda3/envs/pose3.6/lib/python3.6/site-packages/torch_geometric/utils/scatter.py", line 1, in <module>
    import torch_scatter
  File "/scratch/alex/anaconda3/envs/pose3.6/lib/python3.6/site-packages/torch_scatter/__init__.py", line 3, in <module>
    from .mul import scatter_mul
  File "/scratch/alex/anaconda3/envs/pose3.6/lib/python3.6/site-packages/torch_scatter/mul.py", line 3, in <module>
    from torch_scatter.utils.ext import get_func
  File "/scratch/alex/anaconda3/envs/pose3.6/lib/python3.6/site-packages/torch_scatter/utils/ext.py", line 5, in <module>
    import torch_scatter.scatter_cuda
ModuleNotFoundError: No module named 'torch_scatter.scatter_cuda'

@rusty1s
Copy link
Member

rusty1s commented Jun 10, 2019

Hi, if you have CUDA, you have the nvcc compiler, but to access it from the command line you need to add it to your path. I do not know where CUDA is installed on your system (the default directory is /usr/local), so you should consult your admin.

@zc-alexfan
Copy link
Author

Problem resolved. The following are solutions to install nvcc without root access in case someone encounters the same problem:

  1. Download your runfile according to your OS in here.
  2. Run md5sum on your run file to make sure it is not corrupted. The correct checksum is on your CUDA download page. Note, somehow, this file is easily being corrupted. Make sure to check it.
  3. Execute the runfile with the --toolkitpath option, where the path is where you would like the toolkit to sit on. Thus, there is no root requirement. --toolkit is to only install CUDA toolkit (no driver). The --override option might not be needed but if there is warning you might want to turn it on.
bash cuda_10.0.130_410.48_linux --silent --override --toolkit --toolkitpath=/scratch/alex/lib/cuda10
  1. In your bashrc or zshrc file, specify the three PATHs in PyGeometric installation instruction to the installed location.
  2. Remove all previously unsuccessfully installed PyGeometric packages and follow the instruction guide to install it.

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

2 participants