Gitpod supports Jupyter Notebooks through support of the VS Code Jupyter extension. Providing a specific editing experience for those working in data science, data analysis, machine learning, artificial inelligence (AI), scientific research or education.
Gitpod supports Jupyter Notebooks by use of the Jupyter extension in VS Code. The following instructions apply to both VS Code Desktop and VS Code Browser. Whilst you can run a Jupyter notebook server or Jupyter lab server in a Gitpod workspace, exposed on a running port these approaches are not compatible with Gitpod Workspace timeouts as they do not actively tell Gitpod when work (e.g. keystrokes) are being executed in the running server.
Note: Configuring a Jupyter Notebook extension is not “global” to all Organization users. You must include the extension definition in each repo that requires it.
To install the VS Code extension, you’ll need a committed
.gitpod.yml in the repository that your Gitpod workspace is opened for.
gp initto generate a scaffolded
You must configure your Gitpod workspace with the VS Code extension, and the installation of any related packages. See the following, which:
requirements.txtto install Python packages with
- Installs both the Jupyter extension and Python VS Code extension(s).
- Opens the
quickstart-demo.ipynbfile when the workspace starts.
- name: Install required packages & Open Jupyter Notebook
init: pip install -r requirements.txt
command: gp open quickstart-demo.ipynb
Caption: An example
.gitpod.yml with Python and the Jupyter extension.
Changes to the
.gitpod.yml only apply to new workspaces. Commit your
.gitpod.yml to git and restart a new worksapce to test your changes.
Tip: You can use the
gp validatecommand to test configuration changes to the
- Launch a new workspace from your repository. Gitpod will automatically initiate the Jupyter Notebook as per your configuration.
- Create and manage new notebooks, write and execute code, and persist your work, all within a Gitpod workspace.
- An editor and a notebook - You have the full power of the VS Code editor, making it easy to transition between basic notebook work, and data tasks requiring a full editor.
- Collaboration between data science and data engineers - Using notebooks in VS Code means that you don’t have one setup for notebooks, and another for VS Code, making it simpler to maintain a single setup, encouraging collaboration between data scientists and engineers.
- Advanced editor features - VS Code has many personalisation options for themes, etc.
For a practical reference, explore our Jupyter Notebook template on GitHub.