Skip to content Skip to sidebar Skip to footer

Jupyter Notebook - Gpu

I'm working on a Jupyter Notebook and would like to make it run faster by using Google GPU. I've already made a few researches and found a solution, but it didn't work for me. The

Solution 1:

I think what you're asking is not possible. Some explanations:

In your situation you have two frontends, that you are using to interact with your code:

  1. Jupyter Notebook (served to your browser by a local server running your computer)
  2. Google Colab (served from google servers)

Additionally you have two backends that run the code they're receiving from your frontend:

  1. IPython kernels (started by your jupyter process)
  2. Google cloud runtimes (running on google cloud infrastructure, possibly with GPU acceleration)

The following combinations are possible:

  1. Jupyer Notebook --> IPython kernel which is probably the setup you started with.
  2. Google Colab --> Google cloud runtimes is the default setup of Google colab. You upload a notebook file to your google drive (or create a new one). The code you're executing in the Colab interface get's run on google cloud infrastructure. This also give you access to GPU acceleration by activating it in Runtime -> Change Runtime Type
  3. Google Colab --> IPython kernel You're still writing code in the Google Colab interface as in (2), but when you execute a cell it's run by a IPython kernel on your computer using your local hardware. This setup is described in the 'local runtime' help article you linked.

What you're trying to do sounds like:

  1. Jupyter Notebook --> Google cloud runtime which is the only combination here that is not possible.

If you want to run a notebook with GPU acceleration on google cloud hardware you have two options:

  1. Upload it to your Google Drive and edit/run it in Google Colab (setup 2 above)
  2. Use a Google Compute Engine instance to run a Jupyer Notebook as described here. Note that in this case fees may apply.

Post a Comment for "Jupyter Notebook - Gpu"