Creating a conda Environment for Pytorch and Cuda

preview_player
Показать описание
Happy Tuesday, Everyone. Trolol for the thumbnail.

Over the last week have been playing with some autoencoders and trying to build a model to fit the CosMx SMI data. However, getting started was a little frustrating because installing pytorch to use cuda on my machine was a little touch and go depending on order packages were installed. Here I thought to show the results of my troubleshooting so others wouldn't have to go through that process themselves and can start working with deep learning faster.

I don't have anything fancy installed on the main system (outside the conda environment) aside from the latest Nvidia drivers so this should be applicable to others in a similar situation. If you'd like to see videos of some deep learning in the future let me know - there are tons out there but perhaps we can apply it to some biological data in a fun new way.

GitHub repository for this showing the codes as well as a YML file for easy replication:

Codes provided by Pytorch (whose order was adjusted to make installation on the system function properly without errors):

Please consider contributing to my Patreon where I may do merch, gather ideas for future content, and have further discussions:
Рекомендации по теме
Комментарии
Автор

This video is fantastic. It was not until I followed these steps that I managed to get gpu acceleration to work in pytorch. It worked flawlessly for both windows and linux. Thank you so much!

Gramphimcs
Автор

I don't usually comment. But this video saved my life. My dreams can now begin without it being crushed at the beginning. Using the pytorch local command would install a bunch of libraries causing it confuse my computer whenever I would try to run any YOLO models. But with your step by step guidance, I was able to run it after trying so tediously for 4 days. Thank you.

deadadventure
Автор

Alex! You are the best man! I wish you and your family wealth and health!

mancobonkey
Автор

Thank you, DR. ALEX! I can't wait to cook up some Neural Nets :)

scorpionking-kjrp
Автор

thank you so muchhhh! finally can use my gpu TT

tsubaki
Автор

Thank you so much! This really helped :D

Legend-qeoq
Автор

Good tutorial! So you do not need to download cuda toolkit for your PC? Instead you can just download it using conda? I was surprised that it was another version than pytorch or your gpu-drivers.

jacobpiazolo
Автор

Great video. I was surprised to see it was possible to only download cuda in the environment which is great for my project. I am abit curious why you are downloading the pytorch for cuda 12.1 when your cuda download clearly states it is 11.8?

Hankks
Автор

error: could not find a version that satisfies the requirement torch==2.1.0 (from versions: 2.2.0 cpu, 2.2.1 cpu, 2.2.2 cpu, 2.3.0 cpu, 2.3.1 cpu, 2.4.0 cpu) error: no matching distribution found for torch==2.1.0 kindly guide how can i fix this problem

StudyGoalTensionEnjoylifelove
Автор

Great stuff. It works when I follow your instructions, but if I create an environment on python=3.9, it will fail. May I ask if you know why?

allenyu
Автор

Thanks a lot after so many uninstalls (4hr) ;(, this helped .

i got Command 'nvcc' not found, after installing NVCC from the official website. But i got True while checking is_available.
I dont understand why i got this error ?

riddheshmore
Автор

did you already have your cuda toolkit downloaded ? because my new computer with very good specs took forever to complete that task alone. Not an internet speed or vpn problem either because it takes few minutes to download 5gb files from an internet browser. Any idea on the reason why ?

mehdiraouine
Автор

what about nvidia cudnn package, do we have to install it separately

bilalgondal
Автор

I install cuda 11.8, the problem is available () not work but count function work what's that mean?

muamarjasim
Автор

do we need to install cudatoolkit for every conda environment we create?

ijrodmakar
Автор

thanks for the video. i followed everything to the dot torch imported but it returned false i dont know why

atuhairedruscilla
Автор

Hi, Why does it work when the cudatoolkit is 11.8 while the torch you install is 12.1?

Wang-hcof
Автор

i have nvidia t4-8Q, I have CUDA VERSION installed 11.4. Now i have python 3.11 and tried cuda 11.8 and downloaded the other dependencies. But after executing the torch.cuda.is_available() it returns False. What can i do?

enamulrafti
Автор

Error: nvidia-smi is not recognized as an internal or external command, operable program or batch file.
Please help me out this

BhanuPrakash-pjev
Автор

solving environment to install pytorch, torchvision etc. has been running for 3-4 hours now. is that normal or something is wrong?

danielberes