[Guide] Debian 9 Stretch Linux with nVidia 418.x drivers and CUDA 10.1

Message boards : Number crunching : [Guide] Debian 9 Stretch Linux with nVidia 418.x drivers and CUDA 10.1
Message board moderation

To post messages, you must log in.

AuthorMessage
jellifort

Send message
Joined: 4 Jul 19
Posts: 1
Credit: 1,058,847
RAC: 12
United Kingdom
Message 2001345 - Posted: 6 Jul 2019, 18:13:47 UTC
Last modified: 6 Jul 2019, 18:18:39 UTC

[Guide] Debian 9 Stretch Linux with nVidia 418.x drivers and CUDA 10.1

I wanted to make a sub 100 watt dedicated and headerless PC to crunch SETI units quickly. I chose to use Debian Linux for the OS because it's small, fast and easy to work with. This full install is under 2Gb so you can install it to just a USB flash drive (perfect for low power systems or for Windows users who want to try another operating system) or a small HDD or SSD. I'm using this setup with a GTX 1050 Ti and it's complete system draw is just 80 watts (when combined with low power AMD processor) - with a current processing speed of over 920 GFLOPS and work units taking approximately 2-3 minutes to complete. See the computer here.

To use the nVidia 418.x driver and CUDA 10.1 driver described here you'll need a card with a compute capability of 5.0 or higher. This system is also setup to use 1 dedicated CPU core per GPU.

Here's how I did it:

Get Debian 9 (Stretch) - the net install version under 'Small CDs or USB sticks' .

Write the image to a USB drive/CD/DVD using something like Rufus .

Boot and install to drive of your choice - another USB drive/HDD/SSD.

Make note of your <username> and <password> and also the <root_password> during install.

When installing, at 'Software selection' just choose 'SSH server' and nothing else.

Remove installation media and reboot when prompted.

Login using <username> and <password>, then at the prompt type:
	su
	<root_password>


Add non-free, contrib and 'backports' (which is Debian for 'new software') to the sources list:
	nano /etc/apt/sources.list
	-> At the end of each line after 'main' type a space then add:
	contrib non-free
	-> At the end of the file add the following two lines:
	# stretch-backports
	deb http://httpredir.debian.org/debian stretch-backports main contrib non-free
	-> Exit nano and save by typing: [Ctrl]-x, y, [Return]


Update sources:
	apt-get update && apt-get upgrade -y


Create a static IP:
	nano /etc/network/interfaces
	-> Find the line that says something like 'iface enp2s0 inet dhcp' and change the 'dhcp' to 'static' 
	-> Then underneath this line enter your static IP details, for example:
	address 192.168.0.100
	netmask 255.255.255.0
	gateway 192.168.0.1
	dns-nameservers 1.1.1.1 1.0.0.1
	-> Exit nano and save by typing: [Ctrl]-x, y, [Return]


Reboot by typing:
	shutdown -r now


Move to another PC and use a SSH client (e.g. PuTTY ) to connect to the Debian machine using SSH.

Enter the static IP you've set above click 'Open'.

Accept the security alert (it's just the first time the your PC has seen the security certificate).

Login using <username> and <password>, then:
	su
	<root_password>


Download and install the latest nVidia driver (currently 418.x):
	apt-get install -t stretch-backports nvidia-driver -y


Reboot by typing:
	shutdown -r now


Reconnect using SSH client (e.g. PuTTY)

Login using <username> and <password>, then:
	su
	<root_password>


Download and install the latest nVidia SMI (418.x) and Cuda (10.1) drivers
	apt-get install -t stretch-backports nvidia-smi libcuda1 -y


Once installed, you can type the following to see your System Management Information:
	nvidia-smi


Download and install the latest BOINC client:
	apt-get install -t stretch-backports boinc-client -y


Then attach the BOINC client to SETI and then immediately pause the work units:
	boinccmd --project_attach http://setiathome.berkeley.edu <your_account_key>
	boinccmd --project http://setiathome.berkeley.edu nomorework


Stop the BOINC daemon:
	/etc/init.d/boinc-client stop


Change directory to SETI project and download and uncompress the SETI CUDA 10.1 binary blob:
	cd /var/lib/boinc-client/projects/setiathome.berkeley.edu
	wget https://archive.org/download/boinc_setiathome_cuda101/boinc_setiathome_cuda101.tar.gz
	tar -zxvf boinc_setiathome_cuda101.tar.gz


Change file attributes so they all belong to the BOINC daemon and can be executed:
	chown boinc *.*
	chgrp boinc *.*
	chmod 777 *.*


If you have more than 1 GPU, you'll want to edit your cc_config.xml:
	nano /etc/boinc-client/cc_config.xml
	-> Before the end </cc_config> line add:
	<options>
	<use_all_gpus>1</use_all_gpus>	
	</options>
	-> Exit nano and save by typing: [Ctrl]-X, y, [Return]


Reboot by typing:
	shutdown -r now


Reconnect using SSH client (e.g. PuTTY)

Login using <username> and <password>, then:
	su
	<root_password>


Get the work units flowing:
	boinccmd --project http://setiathome.berkeley.edu allowmorework


And that's it. You can of course check progress with:
	boinccmd --get_state
ID: 2001345 · Report as offensive
Profile Keith Myers Crowdfunding Project Donor*Special Project $75 donorSpecial Project $250 donor
Volunteer tester
Avatar

Send message
Joined: 29 Apr 01
Posts: 10135
Credit: 981,981,687
RAC: 1,521,660
United States
Message 2001352 - Posted: 6 Jul 2019, 18:59:00 UTC

Thanks for the minimalist guide to getting the special app working.
Seti@Home classic workunits:20,676 CPU time:74,226 hours
ID: 2001352 · Report as offensive
Profile Tom M
Volunteer tester

Send message
Joined: 28 Nov 02
Posts: 3763
Credit: 224,688,495
RAC: 366,708
United States
Message 2001415 - Posted: 6 Jul 2019, 23:15:42 UTC - in response to Message 2001352.  

Thanks for the minimalist guide to getting the special app working.


+1
A proud member of the OFA (Old Farts Association)
"Over the hill? WHAT Hill? I don't REMEMBER any hill...." (from a bumper sticker I bought at a truck stop).
ID: 2001415 · Report as offensive
Profile ThePHX264 Project Donor

Send message
Joined: 29 May 19
Posts: 84
Credit: 4,310,103
RAC: 19,743
United States
Message 2001984 - Posted: 10 Jul 2019, 19:35:24 UTC

Yes, many many thanks!
ID: 2001984 · Report as offensive
MarkJ Special Project $250 donor
Volunteer tester
Avatar

Send message
Joined: 17 Feb 08
Posts: 1130
Credit: 80,669,131
RAC: 989
Australia
Message 2002078 - Posted: 11 Jul 2019, 11:41:34 UTC

I install the nvidia-kernel-dkms package rather than nvidia-driver:
apt install -t stretch-backports nvidia-kernel-dkms nvidia-opencl-icd-y

Also to save time I have the account* files on a USB key and copy them into the BOINC data directory /var/lib/boinc-client that way you don’t have to tell it to attach to the projects.
BOINC blog
ID: 2002078 · Report as offensive
MarkJ Special Project $250 donor
Volunteer tester
Avatar

Send message
Joined: 17 Feb 08
Posts: 1130
Credit: 80,669,131
RAC: 989
Australia
Message 2002226 - Posted: 12 Jul 2019, 11:12:20 UTC

If you’re doing headless crunchers you can also use BOINCtasks to add projects and control settings. It’s a lot easier to see what they’re up to for day to day operations.
BOINC blog
ID: 2002226 · Report as offensive
Stephen "Heretic" Special Project $250 donor
Volunteer tester
Avatar

Send message
Joined: 20 Sep 12
Posts: 4720
Credit: 159,752,090
RAC: 257,225
Australia
Message 2002230 - Posted: 12 Jul 2019, 11:36:50 UTC - in response to Message 2001345.  

[Guide] Debian 9 Stretch Linux with nVidia 418.x drivers and CUDA 10.1
I wanted to make a sub 100 watt dedicated and headerless PC to crunch SETI units quickly. I chose to use Debian Linux for the OS because it's small, fast and easy to work with. This full install is under 2Gb so you can install it to just a USB flash drive (perfect for low power systems or for Windows users who want to try another operating system) or a small HDD or SSD. I'm using this setup with a GTX 1050 Ti and it's complete system draw is just 80 watts (when combined with low power AMD processor) - with a current processing speed of over 920 GFLOPS and work units taking approximately 2-3 minutes to complete. See the computer here.


. . Apart from overflowed tasks it seems to me that is more like 3 -4 mins and closer to the 4 than 3 :) but still excellent results :)

. . I don't know why but I have an overpowering sense of deja vu here ... :) but you have done an excellent job of a specific end to end description of the process. It should help even more users make the leap into the mysterious depths of Linux territory.

Stephen

:)
ID: 2002230 · Report as offensive

Message boards : Number crunching : [Guide] Debian 9 Stretch Linux with nVidia 418.x drivers and CUDA 10.1


 
©2019 University of California
 
SETI@home and Astropulse are funded by grants from the National Science Foundation, NASA, and donations from SETI@home volunteers. AstroPulse is funded in part by the NSF through grant AST-0307956.