LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Cuda 10? (https://www.linuxquestions.org/questions/slackware-14/cuda-10-a-4175643747/)

trite 12-06-2018 04:24 AM

Cuda 10?
 
Hello!
The cudatoolkit in slackbuilds is very old. I need Cuda 10 to be able to play around with python and tensorflow.

Anyone out there managed to install _any_ Cuda version above version 8 and have any directions for me?

aragorn2101 12-06-2018 06:56 AM

Hi,

First you'll need to get the appropriate version of the nvidia driver which will work with CUDA 10. Check out the release notes to get info on this: https://docs.nvidia.com/cuda/cuda-to...tes/index.html.

Then, there are two ways to proceed. You can either tweak the SlackBuilds script to install the CUDA 10 and be on the safe side as it will all be packaged, so it will be easy to remove if somethings goes wrong.

Or, you can install it manually by running the CUDA "runfile" script.

When you are sure your nvidia module has been loaded at boot, you download and run the script from https://developer.nvidia.com/cuda-downloads (the runfile from Fedora usually works) and run it as root:
Code:

# bash cuda_10..._linux-run
The script is interactive and it will ask you about configuration parameters and where to install what. You just have to plan the install paths well so that you keep track of where everything is.

One possible glitch with running such a new CUDA version is with gcc. In the past, I once encountered a problem in Slackware 14.1 when my native Slackware gcc was a version behind the CUDA gcc. I don't remember which versions exactly, but sometimes these things happen because the CUDA compiler is not built from source when you install. If you encounter this problem you might need to upgrade Slackware's gcc.

aragorn2101 08-06-2019 04:14 AM

Hi again,

I know this thread is relatively old, but I think I have something relevant to add.

I recently upgraded my computer at the university and I got myself a GTX Titan Xp. So, I decided to upgrade from CUDA 8 to CUDA 10. Turns out that much have changed.

So, like it was said before, the SlackBuilds for the cudatoolkit is old, I was not able to just change the version and expect that everything else would work fine. Therefore, I wrote my own SlackBuilds script for CUDA 10. You can check it out at https://github.com/aragorn2101/Slack...er/cudatoolkit.

As I mention in the README, it is not official SlackBuilds and I didn't test with the nvidia-driver and nvidia-kernel available from SlackBuilds.org. Instead I worked with driver and kernel version 430.34 and it worked well. I guess version 430.14 (from SlackBuilds.org at time of writing) will work as well.

I am not going to postulate to replace the cudatoolkit 8 on SlackBuilds as, in a near future, I might not be at the university anymore and I am not sure I will still have a CUDA capable GPU at hand to test.

So, I make this available for all those out there wanting to use CUDA in Slackware. Feel free to adapt depending on your needs or if Nvidia changes stuff again.

I hope this helps.
Cheers. :hattip:

3rensho 08-06-2019 10:31 PM

Thank you for sharing aragorn2101.

wirelessmc 07-11-2020 04:15 PM

I need to get latest CUDA library and toolkit working on a modern slackware64-current. Unfortunately aragorn2101's Slackbuild script is dated at least for my AMD box with nvidia GPU GP108 [GeForce GT 1030] (rev a1).

I can't seem to find a recent build. Any suggestions?

MDKDIO 07-11-2020 04:38 PM

Have you tried Ponce slackbuild for current?

https://github.com/Ponce/slackbuilds...nt/cudatoolkit

I have not tried this my self as I don't have Nvidia

wirelessmc 07-12-2020 08:54 AM

Ponce? I take it that's either gperon or willsr on GIT?

After having spent several hours trying to get the 'old' builds working yesterday I suppose I will give this a try. It's a 2GB package and 'only' takes up 3GB of disk space...Yikes!

It will probably take longer than a few kernels to build :)

Someone should make a torrent for downloading!

Thanks MDKDIO. Stay tuned....

wirelessmc 07-12-2020 09:32 AM

Ok this doesn't look promising..right out of the gate I can't run the Slackbuild script as it html based it won't run in a shell as most normal Slackbuilds do:
./cudatoolkit.SlackBuild: line 6: syntax error near unexpected token `newline'
./cudatoolkit.SlackBuild: line 6: `<!DOCTYPE html>'

wirelessmc 07-12-2020 09:35 AM

Oops...disregard. That's because I tried to use Chrome's "Save link as" to download all of the source. That doesn't work on GIT apparently!

wirelessmc 07-12-2020 11:38 AM

git clone isn't working for this URL. Is there an official URL for git clone? I'll email support@github.com in case I don't hear back from anyone here first.
Cloning into 'cudatoolkit'...
fatal: remote error:
Ponce/slackbuilds/tree/current/development/cudatoolkit is not a valid repository name
Email support@github.com for help

bifferos 07-12-2020 12:31 PM

You could just use afterpkg:

Code:

$ wget https://github.com/bifferos/afterpkg/archive/master.zip
$ unzip master.zip
$ cd afterpkg-master
$ ./afterpkg cudatoolkit

It will download the ponce master as zip and then build the dependencies for you if you don't have them.

MDKDIO 07-12-2020 12:58 PM

Am slow typing here....

Never mind this post...

bassmadrigal 07-12-2020 05:45 PM

Quote:

Originally Posted by wirelessmc (Post 6144616)
git clone isn't working for this URL. Is there an official URL for git clone? I'll email support@github.com in case I don't hear back from anyone here first.
Cloning into 'cudatoolkit'...
fatal: remote error:
Ponce/slackbuilds/tree/current/development/cudatoolkit is not a valid repository name
Email support@github.com for help

Git is designed to download the whole repo, not just that folder.

Code:

git clone https://github.com/Ponce/slackbuilds
There are ways to download individual folders, including using svn if you're connecting to github.

wirelessmc 07-12-2020 06:33 PM

Yes thanks bassmadrigal and MDKDIO. Admittedly like many other code things I am a newbie to GitHub.

Running the below command get's Ponce's entire repository which includes cudnn (the library) which I will most definitely need.

git clone https://github.com/Ponce/slackbuilds.git (not sure if the .git extension is required or not)

The update is: Once I downloaded the correct revision of Nvidia's .run script into the cudatoolkit directory ( i.e. cuda_10.2.89_440.33.01_linux.run ) I was able to build the toolkit with Ponce's Slackbuild script. It only took a couple hours!
That version of the Nvidia's run script is a whopping 2.5GB and not the latest which is 11.something.

Now on to building cudnn.

In case anyone is interested I am building these packages so I can (hopefully) run the cuda version of KataGo (8-dan on IGS). I currently have the OpenCL version running on a Windows machine.


All times are GMT -5. The time now is 07:46 PM.