How to use JupyterLab with a GPU on Paperspace Gradient for Free

Nicholas Underwood
DataDataData
Published in
3 min readOct 14, 2020

Paperspace Gradient is a wonderful product that provides one of the easiest and most affordable ways to quickly get a Jupyter Notebook up and running on a GPU. There’s even a free tier for students and hobbyists!

Jupyter Notebooks and JupyterLab are incredibly popular tools for exploring and developing models on datasets. With a single click on Paperspace, you can have Jupyter up and running in minutes.

Create a free account on Paperspace and follow the steps below to create your new Jupyter environment.

Step 1 — Click Run a sample notebook

Running, training, and deploying on Paperspace.

Step 2 — Choose a container

Paperspace offers many pre-configured containers to get you started.

Step 3 — Choose a machine

There is a variety of CPU and GPU-based options to choose from.

Final Steps — Once you have chosen your container and machine, you can choose a name for your Notebook and off you go!

Paperspace will spin up your container and in minutes you’ll have a fresh environment waiting for your beckoning command.

My Demo Notebook being provisioned.

As handy as a plain old Jupyter Notebook can be, working in JupyterLab gets you *closer* to a traditional IDE experience, offering many extra features that can improve your productivity making it preferable to many.

If you happened to have chosen the PyTorch container for your instance, then you’re done! Clicking open on your instance will take you directly to your new JupyterLab!

A fresh JupyterLab instance on Paperspace Gradient.

If you went with a container that only has Jupyter Notebooks installed and not JupyterLab (such as the Paperspace + Fast.AI container), you just have a couple of steps left.

Once your instance is created and running, opening it with the Open button will take you to the standard Jupyter Notebook homepage.

A fresh Jupyter Notebook instance on Paperspace Gradient.

Using the New dropdown, open a new Terminal.

Open a new Terminal.

In the terminal enter:

pip install jupyterlab

Install JupyterLab with pip.

Once the install is complete, go back to your Paperspace Gradient Dashboard and stop the instance. This will save and shutdown your container.

Shutting down an instance.

Once the shutdown is complete, simply start your instance again. This will open the Jupyter Notebook interface as before, but now you can switch to JupyterLab by changing “/tree” at the end of your URL to “/lab”.

Just change your URL to /lab

That’s it. Enjoy!

--

--