Paperspace
Paperspace offers very affordable remote machines with GPU, and allows for 150Gb permanent storage (that is mounted as /notebook
folder). I find it easier to set up then any other platform. It has many pre-installed deployments like PyTorch, FastAI, Stable Diffusion, and more. It does require monthly subscription that is at the time of writting $8 per month.
SSH commands
To make your life easier before creating any remote instances, copy ssh public key of computers you will be using to access paperspace (like your laptop) to Paperspace SSH keys section (under your account). See this to set up SSH access.
Gradient ML platform
For most of my needs I use free machines on their Gradient ML platform:
Don’t forget to set auto-shutdown time depending on you need, 6 hours is the max:
Once the machine is running, the VSCode icon allows to get the URL of the kernel:
Copy URL and on the local machine in VSCode navigate to: “Select Kernel”->“Select another Kernel”->“Existing Jupyter Kernel”->“Enter the URL of the running Jupyter server”->“Python3 (ipykernel)”:
That’s pretty much it; the kernel is now set in the upper right corner of the VSCode:
Link describes this too.
This is great for majority of my needs, for longer durations one can always restart the machine.
Note again that only files in the /notebook
folder are persistent.
Core machines
Core machines are virtual machines that one can SSH into. More on setting SSH connection in VSCode can be found here.
One must install Python as a VSCode extension:
For setting up the environment see here.
Docker container
A docker contain is a great way to set up an environment. Once the docker container is built and running, one can attach to it from VSCode and use it as a remote machine. To do this, install “Remote Development” extension pack, then one can attach the container in VSCode by going to a command pallette (Cmd+Shift+P) and typing “Attach to running container”. If running into a user issue, you need to add user to docker group:
sudo usermod -aG docker $USER
and (maybe, not always) restart the machine.
To see running containers’ info from paperspace machine use:
docker ps
To stop all the docker containers:
docker container stop ID_or_NAME
docker container stop $(docker container ls -aq)
GPU stats
Use nvidia-smi
to see GPU stats.