From 4836fae212b29a8f9c7b7d10b4e65c0fd4089d61 Mon Sep 17 00:00:00 2001 From: osanseviero Date: Tue, 5 Mar 2024 23:24:47 +0100 Subject: [PATCH 1/2] Add JupyterLab docs --- docs/hub/_toctree.yml | 10 ++++--- docs/hub/spaces-sdks-docker-jupyter.md | 40 ++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 docs/hub/spaces-sdks-docker-jupyter.md diff --git a/docs/hub/_toctree.yml b/docs/hub/_toctree.yml index 19d7ef3d1..9344b3273 100644 --- a/docs/hub/_toctree.yml +++ b/docs/hub/_toctree.yml @@ -204,22 +204,24 @@ title: Your first Docker Spaces - local: spaces-sdks-docker-examples title: Example Docker Spaces + - local: spaces-sdks-docker-jupyter + title: JupyterLab on Spaces - local: spaces-sdks-docker-argilla title: Argilla on Spaces + - local: spaces-sdks-docker-livebook + title: Livebook on Spaces - local: spaces-sdks-docker-label-studio title: Label Studio on Spaces - local: spaces-sdks-docker-aim title: Aim on Spaces - - local: spaces-sdks-docker-livebook - title: Livebook on Spaces - local: spaces-sdks-docker-shiny title: Shiny on Spaces - local: spaces-sdks-docker-zenml title: ZenML on Spaces - - local: spaces-sdks-docker-panel - title: Panel on Spaces - local: spaces-sdks-docker-chatui title: ChatUI on Spaces + - local: spaces-sdks-docker-panel + title: Panel on Spaces - local: spaces-sdks-docker-tabby title: Tabby on Spaces - local: spaces-sdks-docker-giskard diff --git a/docs/hub/spaces-sdks-docker-jupyter.md b/docs/hub/spaces-sdks-docker-jupyter.md new file mode 100644 index 000000000..3d0e41e29 --- /dev/null +++ b/docs/hub/spaces-sdks-docker-jupyter.md @@ -0,0 +1,40 @@ +# JupyterLab on Spaces + +[JupyterLab](https://jupyter.org/) is a web-based interactive development environment for Jupyter notebooks, code, and data. It is a great tool for data science and machine learning, and it is widely used by the community. With Hugging Face Spaces, you can deploy your own JupyterLab instance and use it for development directly from the Hugging Face website. + +## ⚡️ Deploy a JupyterLab instance on Spaces + +You can deploy JupyterLab on Spaces with just a few clicks. First, go to [this link](https://huggingface.co/new-space?template=SpacesExamples/jupyterlab) or click the button below: + + + + + +Spaces requires you to define: + +* An **Owner**: either your personal account or an organization you're a + part of. + +* A **Space name**: the name of the Space within the account + you're creating the Space. + +* The **Visibility**: _private_ if you want the + Space to be visible only to you or your organization, or _public_ if you want + it to be visible to other users. + +* The **Hardware**: the hardware you want to use for your JupyterLab instance. This goes from CPUs to H100s. + +* You can optionally configure a `JUPYTER_TOKEN` password to protect your JupyterLab workspace. When unspecified, defaults to `huggingface`. We strongly recommend setting this up if your Space is public or if the Space is in an organization. + + + +Storage in Hugging Face Spaces is ephemeral, and the data you store in the default configuration can be lost in a reboot or reset of the Space. We recommend to save your work to a remote location or to use persistent storage for your data. + + + + +## Read more + +- [HF Docker Spaces](https://huggingface.co/docs/hub/spaces-sdks-docker) + +If you have any feedback or change requests, please don't hesitate to reach out to the owners on the [Feedback Discussion](https://huggingface.co/spaces/SpacesExamples/jupyterlab/discussions/3). From f1f23a807219be4e23306cbcca921aefaf108a30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?apolin=C3=A1rio?= Date: Wed, 6 Mar 2024 03:09:51 -0600 Subject: [PATCH 2/2] Add persistent and credits --- docs/hub/spaces-sdks-docker-jupyter.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/hub/spaces-sdks-docker-jupyter.md b/docs/hub/spaces-sdks-docker-jupyter.md index 3d0e41e29..76324c7bc 100644 --- a/docs/hub/spaces-sdks-docker-jupyter.md +++ b/docs/hub/spaces-sdks-docker-jupyter.md @@ -32,9 +32,20 @@ Storage in Hugging Face Spaces is ephemeral, and the data you store in the defau +### Setting up persistent storage + +To set up persitent storage on the Space, you go to the Settings page of your Space and choose one of the options: `small`, `medium` and `large`. Once persisent storage is set up, it gets mounted in `/data`. In order to see the persistent folder in the JupyterLab UI, you can create a `symlink` for it in the JupyterLab Terminal. + +```shell +ln -s /data persistent_folder +``` ## Read more - [HF Docker Spaces](https://huggingface.co/docs/hub/spaces-sdks-docker) If you have any feedback or change requests, please don't hesitate to reach out to the owners on the [Feedback Discussion](https://huggingface.co/spaces/SpacesExamples/jupyterlab/discussions/3). + +## Acknowledgments + +This template was created by [camenduru](https://twitter.com/camenduru) and [nateraw](https://huggingface.co/nateraw), with contributions of [osanseviero](https://huggingface.co/osanseviero) and [azzr](https://huggingface.co/azzr).