From b02d79cb001058ba191159e45f231ab5bfb41770 Mon Sep 17 00:00:00 2001 From: Amir Kabbouri Date: Mon, 2 Feb 2026 14:40:21 +0100 Subject: [PATCH 01/20] Ajout de ma feature en draft --- ...2000-01-01-getting-started-with-jupyter.md | 200 ++++++++++++++++++ 1 file changed, 200 insertions(+) create mode 100644 src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md diff --git a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md new file mode 100644 index 000000000..8d5c96470 --- /dev/null +++ b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md @@ -0,0 +1,200 @@ +--- +title: Getting Started with Jupyter Notebook on Scalingo +modified_at: 2025-11-25 12:00:00 +tags: tutorial jupyter notebook +index: 14 +--- + + +Jupyter Notebook is an open-source web application that allows you to create +and share documents containing live code, equations, visualizations, and +narrative text. + + + +## Planning your Deployment + + +By default, Jupyter Notebook stores notebooks on the local filesystem. Since +Scalingo's filesystem is ephemeral, you'll have to provision a +[Scalingo for PostgreSQL®][db-postgresql] addon to persist your notebooks. We +usually advise to start with a Scalingo for PostgreSQL® Starter 512 addon, and +upgrade to a more powerful plan later if need be. + + +Depending on several factors such as the size of your datasets, the complexity +of your computations, and the number of notebooks you run at the same time, +Jupyter Notebook can consume a lot of RAM. + + +## Deploying + + +### Using the Command Line + + +We maintain a repository called [jupyter-notebook-persistence][jupyter-notebook-persistence] +on GitHub to help you deploy Jupyter Notebook on Scalingo. Here are the few +additional steps you will need to follow: + + +1. Clone our repository: + ```bash + git clone https://github.com/Amyti/jupyter-notebook-persistence + cd jupyter-notebook-persistence + ``` + + +2. Create the application on Scalingo: + ```bash + scalingo create my-jupyter + ``` + + Notice that our Command Line automatically detects the git repository, and + adds a git remote to Scalingo: + ```bash + git remote -v + + origin https://github.com/Scalingo/jupyter-scalingo (fetch) + origin https://github.com/Scalingo/jupyter-scalingo (push) + scalingo git@ssh.osc-fr1.scalingo.com:my-jupyter.git (fetch) + scalingo git@ssh.osc-fr1.scalingo.com:my-jupyter.git (push) + ``` + + +3. Provision a Scalingo for PostgreSQL® Starter 512 addon: + ```bash + scalingo --app my-jupyter addons-add postgresql postgresql-starter-512 + ``` + + +4. (optional) Instruct the platform to run the `web` process type in a single + L container: + ```bash + scalingo --app my-jupyter scale web:1:L + ``` + + +5. Set a **mandatory** environment variables: + + Set the password to access Jupyter Notebook: + ```bash + scalingo --app my-jupyter env-set JUPYTER_NOTEBOOK_PASSWORD= + ``` + + +6. Everything's ready, deploy to Scalingo: + ```bash + git push scalingo main + ``` + +## Updating + + +Jupyter Notebook is a Python application, distributed via its own package +called `jupyter`. Updating to a newer version mainly consists in updating your +requirements in the `requirements.txt` file of your Jupyter repository. + + +1. In your Jupyter repository, update the `requirements.txt` file with the + desired version: + ``` + jupyter== + ``` + + +2. Commit the update: + ```bash + git add requirements.txt + git commit -m "Upgrade to Jupyter " + ``` + + +### Using the Command Line + + +- Make sure you've successfully followed the first steps +- Push the changes to Scalingo: + ```bash + git push scalingo main + ``` + + +## Customizing + + +### Environment + + +Jupyter Notebook supports several environment variables to customize its +behavior. + +Moreover, the deployment makes use of the following environment variable(s). +They can be leveraged to customize your deployment: + +- **`SCALINGO_UID`**\\ + This variable will set your UID for your scalingo postgresql account. + +- **`JUPYTER_NOTEBOOK_PASSWORD`** \\ + Sets the password to access the Jupyter Notebook interface. + Jupyter Notebook will start if this variable is not set, you just have to enter your token. + +- **`JUPYTER_TOKEN`**(mandatory)\\ + Sets the token to access the Jupyter Notebook interface.\\ + Jupyter Notebook will not start if this variable is not set. + +- **`DATABASE_URL`** (automatically set)\\ + This variable is automatically set when you provision a Scalingo for + PostgreSQL® addon. It is used to store notebooks persistently in the + database. + + +### Installing Additional Python Packages + + +To install additional Python packages, add them to the `requirements.txt` file +at the root of your repository: + +``` +jupyter +numpy +pandas +matplotlib +scikit-learn +``` + +Then, commit and push your changes to trigger a new deployment. + + + +### Object Storage (Outscale) – Optional + +If you want to store large files or share notebooks across multiple projects, it is **possible** to use an external S3-compatible object storage, such as Outscale Object Storage. + +> ⚠️ Note: By default, JupyterLab uses **pgcontents** with PostgreSQL to persist notebooks. Using S3 storage is **entirely optional**. PostgreSQL is sufficient for most use cases on Scalingo. + +For reference and further details about using S3 storage with JupyterLab, you can check out the [S3ContentsManager documentation](https://github.com/cloudbutton/s3contents). + +No implementation is required to use PostgreSQL — this section is informational only. + + + +## Persistent Storage + + +By default, notebooks are stored in a PostgreSQL database to ensure persistence +across container restarts and redeployments. This is achieved using +[pgcontents][pgcontents], a Postgres-backed storage system for Jupyter. + +This means: + +- Notebooks survive application restarts +- Notebooks benefit from Scalingo's automated database backups +- No data loss due to Scalingo's ephemeral filesystem + + + +[jupyter-notebook-persistence]: https://github.com/Amyti/jupyter-notebook-persistence +[pgcontents]: https://github.com/quantopian/pgcontents +[db-postgresql]: https://doc.scalingo.com/databases/postgresql/getting-started/provisioning +[dashboard]: https://dashboard.scalingo.com/apps/ From 253cb5f2b6bbf670a6d7da1e1300dc4b651103be Mon Sep 17 00:00:00 2001 From: Amir Kabbouri <78351697+Amyti@users.noreply.github.com> Date: Mon, 9 Feb 2026 15:32:21 +0100 Subject: [PATCH 02/20] Update src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: François --- .../getting-started/2000-01-01-getting-started-with-jupyter.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md index 8d5c96470..9a16bfb47 100644 --- a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md +++ b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md @@ -1,6 +1,6 @@ --- title: Getting Started with Jupyter Notebook on Scalingo -modified_at: 2025-11-25 12:00:00 +modified_at: 2026-02-10 12:00:00 tags: tutorial jupyter notebook index: 14 --- From 9a59a0a5f157a01ef91b232bddc032af7812cb94 Mon Sep 17 00:00:00 2001 From: Amir Kabbouri <78351697+Amyti@users.noreply.github.com> Date: Mon, 9 Feb 2026 15:35:53 +0100 Subject: [PATCH 03/20] Update src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: François --- .../getting-started/2000-01-01-getting-started-with-jupyter.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md index 9a16bfb47..c4b96a5ac 100644 --- a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md +++ b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md @@ -175,7 +175,6 @@ If you want to store large files or share notebooks across multiple projects, it For reference and further details about using S3 storage with JupyterLab, you can check out the [S3ContentsManager documentation](https://github.com/cloudbutton/s3contents). -No implementation is required to use PostgreSQL — this section is informational only. From be5d2af876eec20a2a1907dfd1c7f1c63111afc8 Mon Sep 17 00:00:00 2001 From: Amir Kabbouri <78351697+Amyti@users.noreply.github.com> Date: Mon, 9 Feb 2026 15:36:23 +0100 Subject: [PATCH 04/20] Update src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: François --- .../2000-01-01-getting-started-with-jupyter.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md index c4b96a5ac..8506a663c 100644 --- a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md +++ b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md @@ -6,9 +6,8 @@ index: 14 --- -Jupyter Notebook is an open-source web application that allows you to create -and share documents containing live code, equations, visualizations, and -narrative text. +Jupyter Notebook is an open-source web application that allows to create +and share documents called *notebooks* that combine live code, equations, visualizations, and narrative text. Users can run code step by step, inspect outputs instantly, and modify their work dynamically. This makes it ideal for learning, data analysis, or scientific computing. From 151cfa014ba15b13116cbbb300f672cdd5a35cf7 Mon Sep 17 00:00:00 2001 From: Amir Kabbouri <78351697+Amyti@users.noreply.github.com> Date: Mon, 9 Feb 2026 15:36:41 +0100 Subject: [PATCH 05/20] Update src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: François --- .../getting-started/2000-01-01-getting-started-with-jupyter.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md index 8506a663c..38d27da3d 100644 --- a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md +++ b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md @@ -13,7 +13,6 @@ and share documents called *notebooks* that combine live code, equations, visual ## Planning your Deployment - By default, Jupyter Notebook stores notebooks on the local filesystem. Since Scalingo's filesystem is ephemeral, you'll have to provision a [Scalingo for PostgreSQL®][db-postgresql] addon to persist your notebooks. We From 360e674436da5c8ff42858e05ae287bdff5bbc09 Mon Sep 17 00:00:00 2001 From: Amir Kabbouri <78351697+Amyti@users.noreply.github.com> Date: Mon, 9 Feb 2026 15:36:54 +0100 Subject: [PATCH 06/20] Update src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: François --- .../getting-started/2000-01-01-getting-started-with-jupyter.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md index 38d27da3d..9e08228a8 100644 --- a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md +++ b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md @@ -10,7 +10,6 @@ Jupyter Notebook is an open-source web application that allows to create and share documents called *notebooks* that combine live code, equations, visualizations, and narrative text. Users can run code step by step, inspect outputs instantly, and modify their work dynamically. This makes it ideal for learning, data analysis, or scientific computing. - ## Planning your Deployment By default, Jupyter Notebook stores notebooks on the local filesystem. Since From e8cb9dd9840dd5e3863e01f35eba4213bcf90dff Mon Sep 17 00:00:00 2001 From: Amir Kabbouri <78351697+Amyti@users.noreply.github.com> Date: Mon, 9 Feb 2026 15:37:06 +0100 Subject: [PATCH 07/20] Update src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: François --- .../getting-started/2000-01-01-getting-started-with-jupyter.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md index 9e08228a8..c760d8c2c 100644 --- a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md +++ b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md @@ -26,7 +26,6 @@ Jupyter Notebook can consume a lot of RAM. ## Deploying - ### Using the Command Line From 26524e79d4fae652ae13b8a66758a530ae63c08f Mon Sep 17 00:00:00 2001 From: Amir Kabbouri <78351697+Amyti@users.noreply.github.com> Date: Mon, 9 Feb 2026 15:37:42 +0100 Subject: [PATCH 08/20] Update src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: François --- .../getting-started/2000-01-01-getting-started-with-jupyter.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md index c760d8c2c..7c847dfce 100644 --- a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md +++ b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md @@ -163,7 +163,7 @@ Then, commit and push your changes to trigger a new deployment. -### Object Storage (Outscale) – Optional +### Using an Object Storage If you want to store large files or share notebooks across multiple projects, it is **possible** to use an external S3-compatible object storage, such as Outscale Object Storage. From 5c6b6368b330ce9b62428db9bd566532112b68a1 Mon Sep 17 00:00:00 2001 From: Amir Kabbouri <78351697+Amyti@users.noreply.github.com> Date: Mon, 9 Feb 2026 15:38:01 +0100 Subject: [PATCH 09/20] Update src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: François --- .../2000-01-01-getting-started-with-jupyter.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md index 7c847dfce..5defc266d 100644 --- a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md +++ b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md @@ -167,7 +167,10 @@ Then, commit and push your changes to trigger a new deployment. If you want to store large files or share notebooks across multiple projects, it is **possible** to use an external S3-compatible object storage, such as Outscale Object Storage. -> ⚠️ Note: By default, JupyterLab uses **pgcontents** with PostgreSQL to persist notebooks. Using S3 storage is **entirely optional**. PostgreSQL is sufficient for most use cases on Scalingo. +{% note %} +By default, JupyterLab uses **pgcontents** with PostgreSQL® to persist notebooks.\\ +Using S3 storage is **entirely optional**. PostgreSQL® is sufficient for most use cases on Scalingo. +{% endnote %} For reference and further details about using S3 storage with JupyterLab, you can check out the [S3ContentsManager documentation](https://github.com/cloudbutton/s3contents). From 6ae04ff7193a19e972aaebb6e05512ce968dfa3f Mon Sep 17 00:00:00 2001 From: Amir Kabbouri <78351697+Amyti@users.noreply.github.com> Date: Mon, 9 Feb 2026 15:38:11 +0100 Subject: [PATCH 10/20] Update src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: François --- .../getting-started/2000-01-01-getting-started-with-jupyter.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md index 5defc266d..51432eec9 100644 --- a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md +++ b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md @@ -172,7 +172,7 @@ By default, JupyterLab uses **pgcontents** with PostgreSQL® to persist notebook Using S3 storage is **entirely optional**. PostgreSQL® is sufficient for most use cases on Scalingo. {% endnote %} -For reference and further details about using S3 storage with JupyterLab, you can check out the [S3ContentsManager documentation](https://github.com/cloudbutton/s3contents). +For reference and further details about using S3 storage with JupyterLab, you can check out the [S3ContentsManager documentation][jupyter-s3]. From 46ea783108d6f295bac9d13e39ff794aefb58a16 Mon Sep 17 00:00:00 2001 From: Amir Kabbouri Date: Tue, 10 Feb 2026 11:02:10 +0100 Subject: [PATCH 11/20] docs(jupyter): move persistence into note --- ...2000-01-01-getting-started-with-jupyter.md | 111 ++++++++---------- 1 file changed, 46 insertions(+), 65 deletions(-) diff --git a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md index 51432eec9..9984c0543 100644 --- a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md +++ b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md @@ -5,49 +5,56 @@ tags: tutorial jupyter notebook index: 14 --- - Jupyter Notebook is an open-source web application that allows to create -and share documents called *notebooks* that combine live code, equations, visualizations, and narrative text. Users can run code step by step, inspect outputs instantly, and modify their work dynamically. This makes it ideal for learning, data analysis, or scientific computing. - +and share documents called *notebooks* that combine live code, equations, +visualizations, and narrative text. Users can run code step by step, inspect +outputs instantly, and modify their work dynamically. This makes it ideal for +learning, data analysis, or scientific computing. ## Planning your Deployment -By default, Jupyter Notebook stores notebooks on the local filesystem. Since -Scalingo's filesystem is ephemeral, you'll have to provision a -[Scalingo for PostgreSQL®][db-postgresql] addon to persist your notebooks. We -usually advise to start with a Scalingo for PostgreSQL® Starter 512 addon, and +By default, Jupyter Notebook stores notebooks on the local filesystem. Since Scalingo's filesystem is ephemeral, you'll have to provision a +[Scalingo for PostgreSQL®][db-postgresql] addon to persist your notebooks. We usually advise to start with a Scalingo for PostgreSQL® Starter 512 addon, and upgrade to a more powerful plan later if need be. +{% note %} +By default, notebooks are stored in a PostgreSQL® database to ensure persistence +across container restarts and redeployments. This is achieved using +[pgcontents][pgcontents], a Postgres-backed storage system for Jupyter. + +This means: +- Notebooks survive application restarts. +- Notebooks benefit from Scalingo's automated database backups. +- No data loss due to Scalingo's ephemeral filesystem. +{% endnote %} Depending on several factors such as the size of your datasets, the complexity of your computations, and the number of notebooks you run at the same time, Jupyter Notebook can consume a lot of RAM. - ## Deploying ### Using the Command Line - -We maintain a repository called [jupyter-notebook-persistence][jupyter-notebook-persistence] +We maintain a repository called [jupyter-scalingo][jupyter-scalingo] on GitHub to help you deploy Jupyter Notebook on Scalingo. Here are the few additional steps you will need to follow: - 1. Clone our repository: ```bash - git clone https://github.com/Amyti/jupyter-notebook-persistence + git clone https://github.com/Scalingo/jupyter-scalingo cd jupyter-notebook-persistence ``` - 2. Create the application on Scalingo: + ```bash scalingo create my-jupyter ``` Notice that our Command Line automatically detects the git repository, and adds a git remote to Scalingo: + ```bash git remote -v @@ -57,97 +64,86 @@ additional steps you will need to follow: scalingo git@ssh.osc-fr1.scalingo.com:my-jupyter.git (push) ``` - 3. Provision a Scalingo for PostgreSQL® Starter 512 addon: + ```bash scalingo --app my-jupyter addons-add postgresql postgresql-starter-512 ``` - 4. (optional) Instruct the platform to run the `web` process type in a single L container: + ```bash scalingo --app my-jupyter scale web:1:L ``` - 5. Set a **mandatory** environment variables: Set the password to access Jupyter Notebook: + ```bash scalingo --app my-jupyter env-set JUPYTER_NOTEBOOK_PASSWORD= ``` - 6. Everything's ready, deploy to Scalingo: + ```bash git push scalingo main ``` ## Updating - Jupyter Notebook is a Python application, distributed via its own package called `jupyter`. Updating to a newer version mainly consists in updating your requirements in the `requirements.txt` file of your Jupyter repository. - 1. In your Jupyter repository, update the `requirements.txt` file with the desired version: + ``` jupyter== ``` - 2. Commit the update: + ```bash git add requirements.txt git commit -m "Upgrade to Jupyter " ``` - ### Using the Command Line +* Make sure you've successfully followed the first steps +* Push the changes to Scalingo: -- Make sure you've successfully followed the first steps -- Push the changes to Scalingo: ```bash git push scalingo main ``` - ## Customizing - ### Environment - Jupyter Notebook supports several environment variables to customize its behavior. Moreover, the deployment makes use of the following environment variable(s). They can be leveraged to customize your deployment: -- **`SCALINGO_UID`**\\ - This variable will set your UID for your scalingo postgresql account. +* **`SCALINGO_UID`** + This variable sets the UID for your Scalingo PostgreSQL® account. -- **`JUPYTER_NOTEBOOK_PASSWORD`** \\ +* **`JUPYTER_NOTEBOOK_PASSWORD`** Sets the password to access the Jupyter Notebook interface. - Jupyter Notebook will start if this variable is not set, you just have to enter your token. + Jupyter Notebook will start if this variable is not set; you will then have to + enter your token. -- **`JUPYTER_TOKEN`**(mandatory)\\ - Sets the token to access the Jupyter Notebook interface.\\ +* **`JUPYTER_TOKEN`** (mandatory) + Sets the token to access the Jupyter Notebook interface. Jupyter Notebook will not start if this variable is not set. -- **`DATABASE_URL`** (automatically set)\\ - This variable is automatically set when you provision a Scalingo for - PostgreSQL® addon. It is used to store notebooks persistently in the - database. - - ### Installing Additional Python Packages - To install additional Python packages, add them to the `requirements.txt` file at the root of your repository: @@ -161,38 +157,23 @@ scikit-learn Then, commit and push your changes to trigger a new deployment. - - ### Using an Object Storage -If you want to store large files or share notebooks across multiple projects, it is **possible** to use an external S3-compatible object storage, such as Outscale Object Storage. +If you want to store large files or share notebooks across multiple projects, it +is **possible** to use an external S3-compatible object storage, such as +Outscale Object Storage. {% note %} -By default, JupyterLab uses **pgcontents** with PostgreSQL® to persist notebooks.\\ -Using S3 storage is **entirely optional**. PostgreSQL® is sufficient for most use cases on Scalingo. +By default, JupyterLab uses **pgcontents** with PostgreSQL® to persist notebooks. +Using S3 storage is **entirely optional**. PostgreSQL® is sufficient for most use +cases on Scalingo. {% endnote %} -For reference and further details about using S3 storage with JupyterLab, you can check out the [S3ContentsManager documentation][jupyter-s3]. - - +For reference and further details about using S3 storage with JupyterLab, you +can check out the [S3ContentsManager documentation][jupyter-s3]. - -## Persistent Storage - - -By default, notebooks are stored in a PostgreSQL database to ensure persistence -across container restarts and redeployments. This is achieved using -[pgcontents][pgcontents], a Postgres-backed storage system for Jupyter. - -This means: - -- Notebooks survive application restarts -- Notebooks benefit from Scalingo's automated database backups -- No data loss due to Scalingo's ephemeral filesystem - - - -[jupyter-notebook-persistence]: https://github.com/Amyti/jupyter-notebook-persistence +[jupyter-scalingo]: https://github.com/Scalingo/jupyter-scalingo [pgcontents]: https://github.com/quantopian/pgcontents +[jupyter-s3]: https://github.com/cloudbutton/s3contents [db-postgresql]: https://doc.scalingo.com/databases/postgresql/getting-started/provisioning -[dashboard]: https://dashboard.scalingo.com/apps/ + From e6cca38272ad2ca1f02f955e301abaa55dcb6d66 Mon Sep 17 00:00:00 2001 From: Amir Kabbouri <78351697+Amyti@users.noreply.github.com> Date: Mon, 16 Feb 2026 09:32:34 +0100 Subject: [PATCH 12/20] Update src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: François --- .../getting-started/2000-01-01-getting-started-with-jupyter.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md index 9984c0543..057d007bb 100644 --- a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md +++ b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md @@ -175,5 +175,5 @@ can check out the [S3ContentsManager documentation][jupyter-s3]. [jupyter-scalingo]: https://github.com/Scalingo/jupyter-scalingo [pgcontents]: https://github.com/quantopian/pgcontents [jupyter-s3]: https://github.com/cloudbutton/s3contents -[db-postgresql]: https://doc.scalingo.com/databases/postgresql/getting-started/provisioning +[db-postgresql]: {% post_url databases/postgresql/getting-started/2000-01-01-provisioning %} From 10343b2a6a8d37278a1e7f5e05d7c1e44cb85c6d Mon Sep 17 00:00:00 2001 From: Amir Kabbouri <78351697+Amyti@users.noreply.github.com> Date: Mon, 16 Feb 2026 09:33:06 +0100 Subject: [PATCH 13/20] Update src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: François --- .../getting-started/2000-01-01-getting-started-with-jupyter.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md index 057d007bb..02413e936 100644 --- a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md +++ b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md @@ -47,7 +47,6 @@ additional steps you will need to follow: ``` 2. Create the application on Scalingo: - ```bash scalingo create my-jupyter ``` From 145c73054a0fa3b5ccdf456f9bffbcddd14e40b4 Mon Sep 17 00:00:00 2001 From: Amir Kabbouri <78351697+Amyti@users.noreply.github.com> Date: Mon, 16 Feb 2026 09:33:21 +0100 Subject: [PATCH 14/20] Update src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: François --- .../getting-started/2000-01-01-getting-started-with-jupyter.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md index 02413e936..89ed26c8d 100644 --- a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md +++ b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md @@ -53,7 +53,6 @@ additional steps you will need to follow: Notice that our Command Line automatically detects the git repository, and adds a git remote to Scalingo: - ```bash git remote -v From 5f2a9fc8620b85f7fce524a06176eec6c11b9d6b Mon Sep 17 00:00:00 2001 From: Amir Kabbouri <78351697+Amyti@users.noreply.github.com> Date: Mon, 16 Feb 2026 09:33:33 +0100 Subject: [PATCH 15/20] Update src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: François --- .../getting-started/2000-01-01-getting-started-with-jupyter.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md index 89ed26c8d..994a154ed 100644 --- a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md +++ b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md @@ -63,7 +63,6 @@ additional steps you will need to follow: ``` 3. Provision a Scalingo for PostgreSQL® Starter 512 addon: - ```bash scalingo --app my-jupyter addons-add postgresql postgresql-starter-512 ``` From 180870b144c5d2dc21c23b9f8836e872d23ff5af Mon Sep 17 00:00:00 2001 From: Amir Kabbouri <78351697+Amyti@users.noreply.github.com> Date: Mon, 16 Feb 2026 09:34:02 +0100 Subject: [PATCH 16/20] Update src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: François --- ...2000-01-01-getting-started-with-jupyter.md | 35 +++++++++---------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md index 994a154ed..3c35c1fc5 100644 --- a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md +++ b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md @@ -13,24 +13,23 @@ learning, data analysis, or scientific computing. ## Planning your Deployment -By default, Jupyter Notebook stores notebooks on the local filesystem. Since Scalingo's filesystem is ephemeral, you'll have to provision a -[Scalingo for PostgreSQL®][db-postgresql] addon to persist your notebooks. We usually advise to start with a Scalingo for PostgreSQL® Starter 512 addon, and -upgrade to a more powerful plan later if need be. - -{% note %} -By default, notebooks are stored in a PostgreSQL® database to ensure persistence -across container restarts and redeployments. This is achieved using -[pgcontents][pgcontents], a Postgres-backed storage system for Jupyter. - -This means: -- Notebooks survive application restarts. -- Notebooks benefit from Scalingo's automated database backups. -- No data loss due to Scalingo's ephemeral filesystem. -{% endnote %} - -Depending on several factors such as the size of your datasets, the complexity -of your computations, and the number of notebooks you run at the same time, -Jupyter Notebook can consume a lot of RAM. +- By default, Jupyter Notebook stores notebooks on the local filesystem. Since + Scalingo's filesystem is ephemeral, we will replace the local filesystem + with a [Scalingo for PostgreSQL®][db-postgresql] addon to persist the + notebooks. We usually advise to start with a Scalingo for PostgreSQL® Starter + 512 addon, and upgrade to a more powerful plan later if need be. + +- To make Jupyter Notebook store notebooks in the PostgreSQL® database, we will + use [`pgcontents`][pgcontents], a Postgres-backed storage system for Jupyter. + + This means: + - Notebooks survive application restarts. + - Notebooks benefit from Scalingo's automated database backups. + - No data loss due to Scalingo's ephemeral filesystem. + +- Depending on several factors such as the size of your datasets, the complexity + of your computations, and the number of notebooks you run at the same time, + Jupyter Notebook can consume a lot of RAM. ## Deploying From 8b8a0fc0bf87dfc7eeef8660098c398d842cdb8a Mon Sep 17 00:00:00 2001 From: Amir Kabbouri <78351697+Amyti@users.noreply.github.com> Date: Mon, 16 Feb 2026 09:34:16 +0100 Subject: [PATCH 17/20] Update src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: François --- .../getting-started/2000-01-01-getting-started-with-jupyter.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md index 3c35c1fc5..2a3e5a79b 100644 --- a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md +++ b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md @@ -95,7 +95,6 @@ requirements in the `requirements.txt` file of your Jupyter repository. 1. In your Jupyter repository, update the `requirements.txt` file with the desired version: - ``` jupyter== ``` From 37b1e842881b800dc915a338d71674c03d5ec7fd Mon Sep 17 00:00:00 2001 From: Amir Kabbouri <78351697+Amyti@users.noreply.github.com> Date: Mon, 16 Feb 2026 09:34:51 +0100 Subject: [PATCH 18/20] Update src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: François --- .../getting-started/2000-01-01-getting-started-with-jupyter.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md index 2a3e5a79b..be3ce9a6f 100644 --- a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md +++ b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md @@ -100,7 +100,6 @@ requirements in the `requirements.txt` file of your Jupyter repository. ``` 2. Commit the update: - ```bash git add requirements.txt git commit -m "Upgrade to Jupyter " From 395b0c79fc12953bd4acec7076db7593273d9c3f Mon Sep 17 00:00:00 2001 From: Amir Kabbouri <78351697+Amyti@users.noreply.github.com> Date: Mon, 16 Feb 2026 09:34:59 +0100 Subject: [PATCH 19/20] Update src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: François --- .../getting-started/2000-01-01-getting-started-with-jupyter.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md index be3ce9a6f..8a467ee0b 100644 --- a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md +++ b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md @@ -68,7 +68,6 @@ additional steps you will need to follow: 4. (optional) Instruct the platform to run the `web` process type in a single L container: - ```bash scalingo --app my-jupyter scale web:1:L ``` From df76791a172b573229a78158361d0ccafa0d7399 Mon Sep 17 00:00:00 2001 From: Amir Kabbouri Date: Mon, 16 Feb 2026 09:58:53 +0100 Subject: [PATCH 20/20] add terraform section --- ...2000-01-01-getting-started-with-jupyter.md | 91 ++++++++++++++++++- 1 file changed, 89 insertions(+), 2 deletions(-) diff --git a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md index 8a467ee0b..61739433c 100644 --- a/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md +++ b/src/_posts/platform/getting-started/2000-01-01-getting-started-with-jupyter.md @@ -86,6 +86,93 @@ additional steps you will need to follow: git push scalingo main ``` +### Using the Terraform Provider + +{% note %} +The following code blocks are given as examples. +Please adjust the values to suit your needs. +{% endnote %} + +1. Start by forking our [jupyter-scalingo][jupyter-scalingo] repository. + +2. Create the application: + + ```terraform + resource "scalingo_app" "my-jupyter" { + name = "my-jupyter" + stack_id = "scalingo-22" + force_https = true + } + ``` + +3. Link the app to your forked repository: + + ```terraform + data "scalingo_scm_integration" "github" { + scm_type = "github" + } + + resource "scalingo_scm_repo_link" "default" { + auth_integration_uuid = data.scalingo_scm_integration.github.id + app = scalingo_app.my-jupyter.id + source = "https://github.com/Scalingo/jupyter-scalingo" + branch = "main" + } ``` + +4. Provision a Scalingo for PostgreSQL® Starter 512 addon: + + + ```terraform + resource "scalingo_addon" "my-jupyter-db" { + app = scalingo_app.my-jupyter.id + provider_id = "postgresql" + plan = "postgresql-starter-512" + } + ``` + +5. (optional) Run the web process type in a single L container: + ```terraform + resource "scalingo_container_type" "web" { + app = scalingo_app.my-jupyter.id + name = "web" + size = "L" + amount = 1 + } + ``` + + +6. Set the mandatory environment variables: +```terraform +resource "scalingo_environment_variable" "jupyter_password" { + app = scalingo_app.my-jupyter.id + name = "JUPYTER_NOTEBOOK_PASSWORD" + value = "" +} + +resource "scalingo_environment_variable" "jupyter_token" { + app = scalingo_app.my-jupyter.id + name = "JUPYTER_TOKEN" + value = "" +} +``` + +7. Run: +```terraform + terraform plan +``` +Review the changes carefully. + +8. If everything looks good, apply the configuration: + +```terraform + terraform apply +``` + + +9. Once Terraform has finished, your Jupyter Notebook application is ready: + A deployement will automatically be triggered via the SCM integration. + + ## Updating Jupyter Notebook is a Python application, distributed via its own package @@ -157,12 +244,12 @@ is **possible** to use an external S3-compatible object storage, such as Outscale Object Storage. {% note %} -By default, JupyterLab uses **pgcontents** with PostgreSQL® to persist notebooks. +By default, Jupyter Notebooks uses **pgcontents** with PostgreSQL® to persist notebooks. Using S3 storage is **entirely optional**. PostgreSQL® is sufficient for most use cases on Scalingo. {% endnote %} -For reference and further details about using S3 storage with JupyterLab, you +For reference and further details about using S3 storage with Jupyter Notebooks, you can check out the [S3ContentsManager documentation][jupyter-s3]. [jupyter-scalingo]: https://github.com/Scalingo/jupyter-scalingo