Developing an script to install CUDA for pixinsight. Question on how to handle something

pgmrdlm

Active member
I am developing a script to automate the installation of CUDA for use by ra-astro and starnet2 processes.

I am following the instructions that are posted here.rikutalvio instructions for installing CUDA

I have figured out how to automatically verify the following in the instructions.
- Before proceeding, open the following link, and make sure that your GPU has Compute Capability 3.5 or higher.

- Use the 64-bit version of Windows 10 or Windows 11

- Update the GPU drivers; the software used here requires driver version 452.39 or higher.
NVIDIA has a command line tool that was already installed with my NVIDIA which gives this information. I parse it out and verify it.

I also know how to add the enviromental variables that are at the end of the instructions

The download of the NVIDIA cuDNN 8.7.0 for CUDA 11.x requirement. This requires that you login to the NVIDA developer web site. My question is, should I have a popup to require the user to login and download this themselves to the folder I need to find it in. Should I have a popup window having the user stating they have logged into the NVIDIA developer web site(link will be included) and download the file myself(I have tested this, it works)? I can't decide what would be the best approach for this.

The script is written in powershell, and works up to this point. The requirements of the user to be able to run this script is really straight forward.

So, I am open to sugestions on what the best approach should be.

Dan
 
I don't have any answers to your questions but would love to see you get this going. After my latest update, I lost the CUDA functionality.
I'll be watching.
Thanks,
Tim
 
I don't have any answers to your questions but would love to see you get this going. After my latest update, I lost the CUDA functionality.
I'll be watching.
Thanks,
Tim
Updates don't modify the CUDA installation in any way. But they do replace the tensorflow.dll file in the bin folder with the CPU version. All you need to do is put the CUDA enabled DLL back in that folder to restore the GPU processing.
 
Updates don't modify the CUDA installation in any way. But they do replace the tensorflow.dll file in the bin folder with the CPU version. All you need to do is put the CUDA enabled DLL back in that folder to restore the GPU processing.
I have kind of stepped away from this for a bit, not because I can't make it work. But I ended up writting another script to log and porovide information about my data. Total exposures collected, total exposures approved from subframe selection, high and low HFR, equipment, stuff like that. And I am imaging and processing for a monthly challange. So, when skys clear. I jump on the chance to add more data. I need to finish this though. I am pretty sure I have gotten past the hard parts of the script. It verifies everything that is in instructions. Which took me awhile to figure out how to do. Once I did, it was easy. I just can't decide what to do with the file that requires a NINA developer login to download. Force the user to login first, then auto download it. Have the user download it themselves. Just trying to decide which is the easiest way.
 
Updates don't modify the CUDA installation in any way. But they do replace the tensorflow.dll file in the bin folder with the CPU version. All you need to do is put the CUDA enabled DLL back in that folder to restore the GPU processing.
Thanks for that tip. I found the original file in the CUDA folder and put it back into the bin folder and now it works again.
I was afraid I would have to redo the whole process again.
Tim
 
Updates don't modify the CUDA installation in any way. But they do replace the tensorflow.dll file in the bin folder with the CPU version. All you need to do is put the CUDA enabled DLL back in that folder to restore the GPU processing.
Good info! How do I know which file is the CUDA enable DLL that I need to copy into the PI BIN folder?
 
Chris-
Where can I find the CUDA version of tensorflow.dll that is 506,226 KB ? The CUDA version that I've been using is only 493692 KB.
TNx.
Jeff
 
FWIW, my tensorflow.dll is 493692 kb and the CUDA -NVIDIA acceleration seems to work as it has always done.
 
I just installed an NVIDIA GEFORCE GT 1030 GPU card in my desktop (Dell XPS8930, I7 3GHz, 12 processors) to try to get the same ~8x speed up for RC processes that the the NVIDIA GEForce RTX 3050 TI Laptop GPU gives my Dell Vostra 15 7510 laptop. Both machines are Win10 with PI v1.8.9-2, Build 1593.
To try to set this up, I did the following:
0) checked that I had the latest NVIDIA driver for this installed GT 1030.
1) copied the NVIDIIA GPU Computing Toolkit/CUDA/11.8 from the laptop to the c:/Program Files directory on the desktop
2) added the same two environmental variables to the desktop computer that I had added to the environmental variables on the laptop:
CUDA_PATH c:\Program Files\GPU Computing Toolkit\CUDA\v11.8
CUDA_PATH_V11.8 c:\Program Files\GPU Computing Toolkit\CUDA\v11.8
3) made sure I had the same CUDA version tensorflow.dll (493k) installed in Program Files/PixInsight/bin as I have on the laptop (PixInsight updates load in the standard PI tensorflow which is 213K in size).
Yet, when I do all the above, I get NO REDUCTION in running time for executing BXTerminator 2 whatsoever relative to prior to "installing" CUDA. Windows Task Manager shows absolutely no activity on the NVIDIA GPU.
I clearly must be missing something. All suggestions appreciated.
Thanks.
Jeff
 
Last edited:
maybe try russ's repository:

 
I just installed an NVIDIA GEFORCE GT 1030 GPU card in my desktop (Dell XPS8930, I7 3GHz, 12 processors) to try to get the same ~8x speed up for RC processes that the the NVIDIA GEForce RTX 3050 TI Laptop GPU gives my Dell Vostra 15 7510 laptop. Both machines are Win10 with PI v1.8.9-2, Build 1593.
To try to set this up, I did the following:
0) checked that I had the latest NVIDIA driver for this installed GT 1030.
1) copied the NVIDIIA GPU Computing Toolkit/CUDA/11.8 from the laptop to the c:/Program Files directory on the desktop
2) added the same two environmental variables to the desktop computer that I had added to the environmental variables on the laptop:
CUDA_PATH c:\Program Files\GPU Computing Toolkit\CUDA\v11.8
CUDA_PATH_V11.8 c:\Program Files\GPU Computing Toolkit\CUDA\v11.8
3) made sure I had the same CUDA version tensorflow.dll (493k) installed in Program Files/PixInsight/bin as I have on the laptop (PixInsight updates load in the standard PI tensorflow which is 213K in size).
Yet, when I do all the above, I get NO REDUCTION in running time for executing BXTerminator 2 whatsoever relative to prior to "installing" CUDA. Windows Task Manager shows absolutely no activity on the NVIDIA GPU.
I clearly must be missing something. All suggestions appreciated.
Thanks.
Jeff
Well, first of all, the CUDA toolkit is an installed app. I wouldn't trust that you could simply copy the program file from another machine. It's likely that various components are registered during installation. Download and run the installer.

What about the

You missed an environment variable: the CUDA toolkit is in the PATH variable.

Hopefully you got the cuDNN and ZLIB files when you copied over the toolkit? If you properly install the toolkit, you'll need to make sure you add those as a separate operation.
 
Thanks, Tom, Chris-
Looks like the NVIDIA GT 1030 card is not, in fact, CUDA-enabled. Aside from not being on the NVIDIA list as being CUDA-enabled, reinstalling CUDA from the toolkit still did not result in Windows Task Manager showing that the NVIDIA GPU card had any sign of actual activity. Video card compatibility listings in my XPS 8930 manual seem to show no chance of getting a low-profile single-slot NVIDIA card that I can use. So I'll have to continue to do my Russell Croman processing on my Vostra laptop with its built-in GEForce RTX 3050 TI laptop GPU which works great.
CS/Jeff
 
Last edited:
Back
Top