Comprehensive guide to set up GPU for PyTorch?

I am shifting to using PyTorch from Keras and TensorFlow. For both of those, the setup on Anaconda is fairly simple.

conda install keras-gpu

One command does quick work of installing all libraries including cudatoolkit and keras recognizes my GPU.
I installed pytorch and tried running Chatbot example by pytorch on my GPU (GTX 1050 ti) but it doesn’t seem to recognize my device.
Can anyone illustrate the process I need to follow for this?
Do i need to install CudaToolKit separately?
Thank you.

You just need to install the GPU driver on your machine. The binaries ship with CUDA, cudnn and other libraries. Have a look at the website for install instructions.

Solution worked for me, I was installing only PyTorch via Anaconda Navigator. Using command line and the command specified on the page fixed it for me. Thanks.

conda install pytorch torchvision cudatoolkit=10.0 -c pytorch

This one.