Note that there are some explanatory texts on larger screens.

plurals
  1. POQuery For Latest Version of CUDA SDK/Toolkit From Terminal?
    primarykey
    data
    text
    <p>Is there a way to -- from the terminal -- query for the latest toolkit/SDK version???</p> <p>e.g. Does NVIDIA have some sort of server that one can log in and issue a discrete command to get the latest SDK and toolkit??</p> <p>...................................................................................<br> <strong>Background:</strong><br></p> <p>I wrote a small script to perform an unattended install of the core CUDA components -- dev drivers, toolkit, and SDK. </p> <p>Note the drivers already have an automated updated, in that I pass them a flag that tells them to check for the latest version, so I only need to download once and all future updates to the CUDA install will now work</p> <p>Had some initial errors, but worked it out with a bit of help. <a href="https://superuser.com/questions/412259/expect-script-inside-bash-script-optional-statement">[1]</a><a href="https://stackoverflow.com/questions/10150939/formatting-expect-script-inside-of-user-command-in-bash-script">[2]</a>.</p> <p>The <code>init</code> is to take down the <code>X11</code> server if one is running, in order to complete the video dev driver install. The <code>yum</code> is to install <code>expect</code> if it's not present.</p> <pre><code>#!/bin/bash CR="\r" YES="\"Yes\r\"" INSTALL_PATH_REQUEST="\"Enter install path\"" CUDA_PATH_REQUEST="\"Enter CUDA install path\"" UNINSTALL_REQUEST="\"Would you like to uninstall?\"" TOOLKIT=`ls -t cudatoolkit* | head -n 1` TOOLKIT_EXPECT="sh $TOOLKIT" SDK=`ls -t gpucomputingsdk* | head -n 1` SDK_INSTALL_PATH="\"/usr/local/CUDA_SDK\r\"" SDK_EXPECT="sh $SDK" DUMMY="dummy" /bin/su root -c "yum -q -y install expect expectk; /sbin/init 3; sh `ls -t NVIDIA*|head -n 1` -s --update -a -X; /usr/bin/expect &lt;&lt;EOF; spawn $TOOLKIT_EXPECT expect -timeout 300 $INSTALL_PATH_REQUEST send $CR expect -timeout 300 { {Would you like to uninstall?} { send $YES exp_continue } expect -timeout 500 $DUMMY eof } EOF /usr/bin/expect &lt;&lt;EOF; spawn $SDK_EXPECT expect -timeout 300 $INSTALL_PATH_REQUEST send $SDK_INSTALL_PATH expect -timeout 300 $CUDA_PATH_REQUEST send $CR expect -timeout 500 $DUMMY EOF /sbin/init 5" </code></pre> <p>If someone can figure out how to query the SDK and toolkit remotely for updates, this would be the (almost) perfect unattended installer. Any other advice would also be appreciated if you think I'm missing anything.</p> <p>P.S. You need the dev driver, toolkit, and SDK files in the same directory for this to work. When it asks you for the password, that's asking for your root password. I choose to install the SDK in <code>/usr/local/CUDA_SDK/</code> to allow all users access. If you wish to install it in another location, change it in the script.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload