Skip to content

Commit 702fa70

Browse files
authored
Merge pull request #528 from nebari-dev/jupyter-gallery
2 parents 856fc4d + 96db8a4 commit 702fa70

File tree

7 files changed

+109
-2
lines changed

7 files changed

+109
-2
lines changed

β€Ždocs/docs/explanations/advanced-custom-settings.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ jupyterlab:
155155

156156
- `jupyterlab.preferred_dir` - Sets the default location in which JupyterLab should open the file browser in.
157157

158-
- `jupyterlab.gallery_settings` - Configures [`jupyterlab-gallery`](https://github.com/nebari-dev/jupyterlab-gallery) extension which enables user to clone (and later synchronise) pre-specified repositories.
158+
- `jupyterlab.gallery_settings` - Configures [`jupyterlab-gallery`](https://github.com/nebari-dev/jupyterlab-gallery) extension which enables user to clone (and later synchronise) pre-specified repositories. See [How to set up a Git Repository via JupyterLab-Gallery](../how-tos/jupyter-gallery) for more detailed information.
159159

160160
```yaml
161161
jupyterlab:
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
---
2+
title: Share Git Repository via JupyterLab-Gallery
3+
description: Share files or tutorials with your team
4+
---
5+
6+
# How to set up a Git Repository via JupyterLab-Gallery
7+
8+
[JupyterLab-Gallery ](https://github.com/nebari-dev/jupyterlab-gallery) is a JupyterLab plugin
9+
that allows users to share a Git Repository. JupyterLab users are presented with a tile in
10+
the JupyterLab launch screen. Users can choose to download the Exhibit.
11+
12+
By default, if no JupyterLab-Gallery items are added to the config, users will not see this section
13+
in the JupyterLab Launcher.
14+
15+
This feature was added to Nebari in the 2024.6.1 release.
16+
17+
## Configure JupyterLb-Gallery
18+
19+
In Nebari, the JupyterLab-Gallery configuration is set in the Nebari configuration, `nebari-config.yaml`.
20+
21+
The configuration is set under the `jupyterlab` section under the subsection `gallery_settings`.
22+
Users may set a title for the Gallery section of the Launcher screen and a destination (i.e. folder)
23+
for the location of the cloned repos.
24+
25+
Several repositories can be configured to display as individual gallery tiles. Under the `exhibits`
26+
section, each repository must have a `title` and a `git` location. There are also several other
27+
optional config options.
28+
29+
The configuration is set at two different levels. Top level gallery settings define the title of
30+
the Gallery section and the location in which the repositories are downloaded. The repository
31+
level settings are defined for each repository. The settings in each section are described
32+
below.
33+
34+
**Top Level Gallery Settings**
35+
36+
| Section | Description |
37+
| ----------- | -------------------------------------------------- |
38+
| title | Title on the gallery tile |
39+
| destination | Location on disk where the repo will be downloaded |
40+
41+
**Repository Level Settings**
42+
43+
| Section | Description |
44+
| ----------- | ----------------------------------------------------------------------------------- |
45+
| title | Title on the gallery tile |
46+
| git | URL of the git repository |
47+
| homepage | (Optional) |
48+
| description | Description of the repository to appear on the gallery tile (Optional) |
49+
| icon | URL or base64 encoded image to use an icon to appear on the gallery tile (Optional) |
50+
| account | (Optional) |
51+
| token | Private Access Token to enable access to private repositories (Optional) |
52+
53+
### Sample configuration
54+
55+
Below is an example of the Gallery settings from the `nebari-config.yaml`. Note that \<encoding\>
56+
and \<PAT\> should be replaced with the actual encoding and Private Access Token, respectively.
57+
58+
```
59+
jupyterlab:
60+
gallery_settings:
61+
title: Demos
62+
destination: demos
63+
exhibits:
64+
- title: Data of an Unusual Size
65+
git: https://github.com/nebari-dev/big-data-tutorial.git
66+
description: Big data tutorial focusing on Dask usage in Nebari
67+
icon: "data:image/png;base64,<encoding>"
68+
homepage: https://github.com/nebari-dev/big-data-tutorial/
69+
- title: From RAGs to riches
70+
git: https://github.com/Quansight/ragna-presentations.git
71+
homepage: https://github.com/Quansight/ragna-presentations/
72+
- title: Private Examples
73+
description: Internal company examples
74+
icon: "data:image/png;base64,<encoding>"
75+
git: https://gitlab....net/companyxyz/examples.git
76+
account: examples
77+
token: "<PAT>"
78+
```
79+
80+
## Using JupyterLab-Gallery
81+
82+
Once the repositories are configured in the Nebari config and redeployed, all users will have
83+
a section on their JupyterLab Launcher screen for the Gallery.
84+
85+
![JupyterLab Gallery tiles on JupyterLab Launcher screen](/img/how-tos/jupyter-gallery-tiles.png)
86+
87+
Each tile points to a different gallery entry in the configuration. The Gallery repositories
88+
will not be downloaded until users trigger the download for each gallery item. To do so, users
89+
will hover over the tile and click the download button.
90+
91+
![JupyterLab Gallery tile on hover for undownloaded repo](/img/how-tos/jupyter-gallery-tile-download.png)
92+
93+
The repository will download to the location specified in the config (in each user's private
94+
space). After the download is complete, hover on the gallery tile present the users with two
95+
new options - the folder icon allows them to jump to the location in the JupyterLab file browser,
96+
and the download button allows them to fetch an updated copy of the repo (if available).
97+
98+
![JupyterLab Gallery tile on hover to update repo](/img/how-tos/jupyter-gallery-tile-update.png)
99+
100+
## Conclusion
101+
102+
For more information on the JupyterLab-Gallery project, visit the
103+
[JupyterLab-Gallery codebase repo](https://github.com/nebari-dev/jupyterlab-gallery).
104+
105+
For more information about custom JupyterLab Overrides in the Nebari config, visit the [Custom Overrides Configurations](../explanations/custom-overrides-configuration#jupyterlab) documentation.

β€Ždocs/docs/tutorials/using_dask.mdβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,12 @@ Be sure to select an environment which includes `Dask`, and note that the versio
4848
We recommend the [`nebari-dask` metapackage](https://anaconda.org/conda-forge/nebari-dask). We publish this metapackage alongside Nebari to easily provide you with the correct Dask packages and versions, just be sure that the `nebari-dask` version matches your Nebari deployment version.
4949

5050
If the nebari-dask environment does not include all the packages needed, here is a list to [create a new environment](/docs/tutorials/creating-new-environments):
51+
5152
- python >=3.11
5253
- pip
5354
- nebari-dask
5455
- gcsfs
55-
56+
5657
:::
5758

5859
Nebari has set of pre-defined options for configuring the Dask profiles that we have access to.

β€Ždocs/sidebars.jsβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ module.exports = {
7878
"how-tos/install-pip-packages",
7979
"how-tos/fine-grained-permissions",
8080
"how-tos/connect-via-ssh",
81+
"how-tos/jupyter-gallery",
8182
],
8283
},
8384
{
20.5 KB
Loading
23.4 KB
Loading
41.9 KB
Loading

0 commit comments

Comments
Β (0)