Working in Jupyter Notebooks
You can run Beam functions from Jupyter Notebook cells, which is useful for outsourcing heavy computation to Beam’s serverless cloud.
View the Example Notebook
Try out an example Jupyter Notebook
Beam can only run in local notebooks. You can’t use Beam in Google Colab.
Currently, it’s not possible to invoke Beam from remote Jupyter
environments, like Google Colab — however we hope to support this in the
future!
Setup a Notebook
You can spin up a local Jupyter notebook server using the jupyter
CLI.
If you already have a local Jupyter environment, you can skip this step.
If you don’t have it installed yet, you can do it with pip
:
pip3 install --upgrade pip && pip3 install jupyter
Launch the notebook server. The typically opens the server on localhost:8888
.
jupyter notebook
Setup Beam Locally
Make sure you already have Beam setup locally. You can verify that Beam is installed by running this command in your shell:
beam task list
Invoke Beam from Notebook Cells
Your local notebook server has access to the Beam credentials on your computer, so you can run Beam functions in the notebook cells like you normally would.
You can run GPU accelerated functions, mount storage volumes, and use the full-functionality of Beam from the notebook.
Was this page helpful?