Skip to content

Commit

Permalink
Updated to newest version of JupyterLab.
Browse files Browse the repository at this point in the history
Improved documentation.
  • Loading branch information
janpfeifer committed Oct 16, 2024
1 parent 512462e commit 51ce7f0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#######################################################################################################
# Base image from JupyterLab
#######################################################################################################
ARG BASE_IMAGE=jupyter/base-notebook
ARG BASE_IMAGE=quay.io/jupyter/base-notebook
ARG BASE_TAG=latest
FROM ${BASE_IMAGE}:${BASE_TAG}

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ There is also
that one can interact with (make a copy first) — if the link doesn't work (Google Drive sharing publicly
is odd), [download it from GitHub](examples/google_colab_demo.ipynb) and upload it to Google's Colab.

Finally, because it's compiled and not intepreted, it has a slightly different "semantic" than the Python kernels.
Finally, because it's compiled and not interpreted, it has a slightly different "semantic" than the Python kernels.
It's highly recommended quickly browsing through the [**tutorial**](examples/tutorial.ipynb).

## Installation
Expand Down
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Added sudo for apt install and apt update.
* Added support for `autostart.sh` that if present in the mounted container `/notebooks` directory, and if root owned
and set as executable.
* Updated Dockerfile to latest version to JupyterLab -- now the base docker is served `quay.io/jupyter/base-notebook`

## v0.10.5, Added SendAsDownload

Expand Down
14 changes: 11 additions & 3 deletions docs/docker.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
# Docker Customization

If the container you run `gonb` needs some custom initialization, and you don't want to simply edit the dockerfile and
create your own docker, just create the file `autostart.sh` in the directory mounted under `/notebooks` in the container,
owned by `root` and with executable permissions, and it will be executed at start up of the container by default.
1. The docker runs _JupyterLab_ and _GoNB_ under the user `$NB_USER` (== "jovyan").
2. It has configured `sudo` privileges for `apt update` and `apt install *`. So a cell with
`!sudo apt install <my_package>` will work, and install your package.
3. One can always create another docker based on `janpfeifer/gonb_jupyterlab@latest`
4. Create an `autostart.sh` script, see next section.

## Customization with `autostart.sh`

If you create the file `autostart.sh` in the directory mounted under `/notebooks` in the container,
**owned by `root` and with executable permissions**, it will be executed at start up of the container by default
**as `root`**.

This allows you to download/install databases, or set up credentials, etc.

Expand Down

0 comments on commit 51ce7f0

Please sign in to comment.