import torch
= torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
device if torch.cuda.is_available():
print(torch.cuda.current_device())
print(torch.cuda.device_count())
print(torch.cuda.get_device_name(0))
device
Development Environment Setup
Following the instructions of the course site with respect to the course docker container
- Install docker on your machine.
- Clone the repo (For windows users ensure that you clone it on the WSL2 filesystem.) Show this by a screenshot below of the terminal where you have cloned the repo.
- Build and launch the docker container inside your desired IDE (if you havent used an IDE before you can start with VSCode).
- Launch the virtual environment with
rye sync
inside the container and then show a screenshot of your IDE and the terminal with the(your virtual env)
prefix. - Select the kernel of your virtual environment (.venv folder) and execute the following code. Save the output of all cells of this notebook before submitting.
In [2]: