To get ready, we are going to use Docker with an application version greater than 19. In Docker 19, the --gpu tag was added, allowing you to use Docker to access the GPU natively. Depending on your GPUs, you may need to install additional drivers to make the GPUs work on your machine.
We are also going to be using Visual Studio Code (VS Code), which, with the help of a plugin, allows you to write code directly in NVIDIA's GPU PyTorch container. You will need to perform the following steps:
- Download and install VS Code and then use the extension manager to add the Remote Development Extension Pack by clicking on the extension icon.
- Optionally, you can sign up for NVIDIA GPU Cloud, which has a catalog of containers and models.
- Pull the NVIDIA Docker image for PyTorch:
docker pull nvcr.io/nvidia/pytorch:20.02-py3
- Create a folder where you want to map the code to on your computer. Then, in a terminal window, navigate to the directory you created.
- Run...