-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Installing from source using Conda and CUDA could be improved #302
Comments
Looks like we need to do something to make the For now, the easiest workaround to do would be to install the prebuilt Note you can still use |
@hawkinsp thanks for the suggestion.
Although that's fine temporary I would prefer to avoid this. Especially in my case with rolling release os. The above solution is fine till my next upgrade where cuda will be updated and then I'll have to build again, that's why I prefer the conda solutions since they are isolated evironment snapshots not affected by time releases of os or other libs |
That doesn't work either:
Testing jax:
Error:
It seems to me like the paths for cuda are hard-coded |
This particular error comes from XLA (which is included as part of TF) so this is indeed a common issue across TF and JAX, most likely. I think you should be able to work around it by setting the environment variable: Out of curiosity, where is your CUDA installation? One thing we could do is add more paths to the list of search paths XLA uses to find |
@hawkinsp thanks for the tip
This did the trick!
What would be very useful is to break out of those dependencies if possible. Conda gives the ability to install cudatoolkit and cudnn, but those are light files such as
I am afraid not, and that is by choice since I like to keep things separated in their own environments. This is especially helpful because I have rolling release distro. So whenever my distro pkg manager updates cuda I'll have to recompile any software that relies on |
I looked into this a bit more. Unfortunately I don't think we can use Conda's (Aside: I note also that, for example, the PyTorch build also requires the user to install CUDA system-wide, not from I think for now, the best I can do is recommend something like this: Step 1Install CUDA somewhere (e.g. use NVidia's runfile-based installer). You can put it anywhere you like, system-wide or in your home directory. I installed it in Step 2
I hope that helps? I'm sorry I don't have a better suggestion; what gets redistributed in |
@hawkinsp Thanks once again for the comprehensive reply.
I don't think this statement is correct though.
I have cuda10 installed system-wise, that doesn't prevent me from installing pytorch with cuda9 and use that:
Example:
|
The point is that you still need some system-wide install to get I think it would be better to either:
(But note there's a minor hurdle to the latter, too. XLA needs two unusual things from the CUDA runtime — Would providing prebuilt Conda packages solve your problem adequately? |
@hawkinsp thanks a lot, especially for your patience.
I think that would be useful for a lot of ppl, not just me and would actually make jax more popular so that ppl could give it a try and report back on things that worked and things that didn't work. That would facilitate better development of jax IMHO. |
Thank you, this lets me install JAX with GPU support on my conda environment!
yes please, esp. if there are pip related regressions like here |
How to delete cuda and cudnn from Conda? Since Conda-installed CUDA has the error as follows, I want to remove conda-installed cuda and cudnn, and install independent CUDA and cudnn from Nvidia. Error : Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above. However, while I use the commands as follows but can not remove them, I can not remove them.l I see that two documents including cudatoolkit-10.0.130-0 and cudnn-7.3.1-cuda10.0.0_0 in the path as /home/anaconda3/pkgs/cudatoolkit-10.0.130-0 How can I delete cuda and cudnn embedded in Anaconda. Thanks in advance, Mike |
That question might be better for a Conda mailing list or issue tracker; I don't think we know much about Conda. |
These steps broadly worked for me with a few tweaks:
Altogether, try modifying step 2 as: conda create -n jax python tensorflow-gpu scipy future cudnn=YOUR_VERSION Then reboot Did this work for anyone else? It took about an hour to build. Is this normal? |
I tried this (with 2 simple additional steps, highlighted) but got the errors below
However, maybe I should somehow use the locations below?
|
i want to upgrade tensorflow-gpu=1.9 to tf-gpu=1.14 in conda environment but the problem is when i try to upgrade it automatically upgrade cuda and cudnn which i don't want. anyone can guide me how to upgrade tf-gpu without disturbing CUDAA and cudnn. thanks |
Not sure how you ended up on this issue tracker, but TensorFlow binaries are tied closely to specific CUDA and cuDNN versions. If you want to use e.g. TF 1.14 with CUDA 9, I believe you’ll need to build it from source. |
I think you can close this issue :)
Sorry for the noise.
…On Sat, Sep 14, 2019 at 9:30 AM James Bradbury ***@***.***> wrote:
Not sure how you ended up on this issue tracker, but TensorFlow binaries
are tied closely to specific CUDA and cuDNN versions. If you want to use
e.g. TF 1.14 with CUDA 9, I believe you’ll need to build it from source.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#302>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABDK6EBSL7DZF3OJKQRYCU3QJUGSRANCNFSM4GTZIWLA>
.
|
If you install cudatoolkit-dev from the conda-forge channel, nvcc is there. I can get jax to work from the binary wheel with the 10.1 version... |
Could you maybe tell us how you did it? (I'm guessing environment vars, but I can't get it to work without a system-wide CUDA installation...) |
@rahuldave I was able to get nvcc from cudatoolkit-dev as you said, but did you run into the following at all where it cannot find the runtime file? |
Figured it out - just had to include the directory in my environment with cuda_runtime.h during the call to nvcc. Found that directory using |
Closing since this bug looks stale. Feel free to reopen if there's some action for us to take! |
Thanks to all contributors for their efforts in creating and open sourcing the library.
I would like to add my 2 cents of installation process involving building from source for whatever that's worth.
I always like to install things in conda envs so that there is no clash between different software version or requirement libraries.
MWE:
Now the installation process:
2 Problems arise:
Anyone else having other ideas on how to resolve this?
The text was updated successfully, but these errors were encountered: