This docker stack uses modified startup scripts from
jupyter/docker-stacks.
ℹ️ Nevertheless, all Docker Options
and Permission-specific configurations
can be used for the images of this docker stack.
In comparison to pangeo-data/jupyter-earth, these images are tweaked as follows:
Shell script /usr/local/bin/start.sh is modified to
- allow bind mounting of a home directory.
The following startup hooks are put in place:
- /usr/local/bin/start-notebook.d/10-populate.sh
to populate a bind mounted home directory
/home/jovyan
. - /usr/local/bin/before-notebook.d/10-env.sh to
- update timezone according to environment variable
TZ
. - add locales according to environment variable
LANGS
. - set locale according to environment variable
LANG
.
- update timezone according to environment variable
- /usr/local/bin/before-notebook.d/11-home.sh to create user's projects and workspaces folder.
- /usr/local/bin/before-notebook.d/30-xfce.sh to
- set DPI.
- use custom xinitrc.
- set font to MesloLGS NF (Terminal).
- set style to Adwaita-dark (Appearance).
- set background to black (Desktop).
- /usr/local/bin/before-notebook.d/70-qgis.sh to
- put inital settings in place.
- copy plugin 'Processing Saga NextGen Provider'.
- /usr/local/bin/before-notebook.d/90-limits.sh
- soft limit the address space based on the amount of physical and
virtual memory of the host. (default: command
ulimit -v
) - limit the number of file descriptors according to environment variable
NOFILE_LIMIT
. (default: commandulimit -n
) - limit the number of processes according to environment variable
NPROC_LIMIT
. (default: commandulimit -u
) - limit the number of pending signals according to environment variable
SIGPEN_LIMIT
. (default: commandulimit -i
)
- soft limit the address space based on the amount of physical and
virtual memory of the host. (default: command
- /usr/local/bin/before-notebook.d/95-misc.sh
to export environment variables to
/tmp/environment
.
/usr/local/bin/busy is executed during
screen
/tmux
sessions to update the last-activity timestamps on JupyterHub.
ℹ️ This prevents the JupyterHub Idle Culler Service
from shutting down idle or long-running Jupyter Notebook servers, allowing for
unattended computations.
Versions
QGIS_VERSION
JUPYTERHUB_VERSION
JUPYTERLAB_VERSION
PYTHON_VERSION
GIT_VERSION
OTB_VERSION
TURBOVNC_VERSION
GRASS GIS
GRASS_PYTHON
: Set to/usr/bin/python3
Otherwise, grass
would use /user/local/bin/python3
.
ℹ️ grass
was built against Python and packages from the
distro's package repository.
Orfeo Toolbox
GDAL_DRIVER_PATH
: Set todisable
(amd64 only)OTB_APPLICATION_PATH
: Set to/usr/local/lib/otb/applications
(amd64 only)PYTHONPATH
: Set to/usr/local/lib/otb/python
(amd64 only)
A subset of the environment variables used in otbenv.profile
.
Miscellaneous
BASE_IMAGE
: Its very base, a Docker Official Image.PARENT_IMAGE
: The image it was derived from.BUILD_DATE
: The date it was built (ISO 8601 format).
The default shell is Zsh, further enhanced with
- Framework: Oh My Zsh
- Theme: Powerlevel10k
- Font: MesloLGS NF
- IPython:
- Only enable figure formats
svg
andpdf
for IPython.
- Only enable figure formats
- IPython kernel:
- Only enable figure formats
svg
andpdf
for IPython Kernel (Jupyter Notebooks).
- Only enable figure formats
- JupyterLab:
- Theme > Selected Theme: JupyterLab Dark
- Terminal > Font family: MesloLGS NF
- Python LSP Server: Example settings according to jupyter-lsp/jupyterlab-lsp > Installation > Configuring the servers
- Autostart
- DPI setting:
Set DPI accoding to variable
DPI
exported in~/.xprofile
. (QGIS versions ≥ 3.34.0)
- DPI setting:
Set DPI accoding to variable
- Xfce xinitrc:
~/.xprofile
: Commands to execute at the beginning of the X user session. (QGIS versions ≥ 3.34.0)
ℹ️ To set a custom display resolution not available in 'Display Settings'.~/.i18n
: SetLANG
to change the system language of the desktop environment.
ℹ️ To override environment variableLANG
. Must be one ofLANGS
.
- Xfce Panel:
- Hide 'Lock Screen' and 'Log Out...' because those kill the session.
(Removed: 'Log Out' from Applications)
(Disabled: Ctrl+Alt+Del to trigger session logout)
- Hide 'Lock Screen' and 'Log Out...' because those kill the session.
- Xfce Terminal:
- Set
FontName=MesloLGS NF 10
andEncoding=UTF-8
.
- Set
- QGIS Desktop:
- Append
/usr/lib/python3/dist-packages
toPYTHONPATH
.
ℹ️ One distro refused to find the Python bindings to QGIS (at/usr/lib/python3/dist-packages/qgis
)...
- Append
- Zsh
- Oh My Zsh:
~/.zshrc
- Set PATH so it includes user's private bin if it exists
- Update last-activity timestamps while in screen/tmux session
- Powerlevel10k:
p10k configure
- Does this look like a diamond (rotated square)?: (y) Yes.
- Does this look like a lock?: (y) Yes.
- Does this look like a Debian logo (swirl/spiral)?: (y) Yes.
- Do all these icons fit between the crosses?: (y) Yes.
- Prompt Style: (3) Rainbow.
- Character Set: (1) Unicode.
- Show current time?: (2) 24-hour format.
- Prompt Separators: (1) Angled.
- Prompt Heads: (1) Sharp.
- Prompt Tails: (1) Flat.
- Prompt Height: (2) Two lines.
- Prompt Connection: (2) Dotted.
- Prompt Frame: (2) Left.
- Connection & Frame Color: (2) Light.
- Prompt Spacing: (2) Sparse.
- Icons: (2) Many icons.
- Prompt Flow: (1) Concise.
- Enable Transient Prompt?: (n) No.
- Instant Prompt Mode: (3) Off.
- Oh My Zsh:
- Terminal IPython: Create file
~/.ipython/profile_default/ipython_config.py
- Valid figure formats:
png
,retina
,jpeg
,svg
,pdf
.
- Valid figure formats:
- IPython: Create file
~/.ipython/profile_default/ipython_config.py
- Valid figure formats:
png
,retina
,jpeg
,svg
,pdf
.
- Valid figure formats:
- JupyterLab: Settings > Advanced Settings Editor
- Zsh
- Oh My Zsh: Edit
~/.zshrc
. - Powerlevel10k: Run
p10k configure
or edit~/.p10k.zsh
.- Update command:
git -C ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k pull
- Update command:
- Oh My Zsh: Edit
noVNC + TurboVNC can take full advantage of a HiDPI/Retina display. E.g. for standard 2160p/4K UHD (3840x2160):
- Create file
~/.xprofile
with the following content:ℹ️ xrandr values according to commandxrandr --newmode "3840x2160_60.00" 712.34 3840 4152 4576 5312 2160 2161 2164 2235 -HSync +Vsync xrandr --addmode VNC-0 "3840x2160_60.00" xrandr -s 3840x2160 export DPI=192
gtf 3840 2160 60
- Close 'QGIS Desktop'.
- Stop and restart the Jupyter server.
- Open 'QGIS Desktop'.
- Change the following settings:
- Appearance > Settings: Window Scaling: 2x
- Window Manager > Style: Theme: Default-xhdpi
- Mouse and Touchpad > Theme: Size: Increase/Decrease 'Cursor size' if required.
- Close 'QGIS Desktop'.
- Stop and restart the Jupyter server.
- Open 'QGIS Desktop'.
With the browser in full screen mode (hidden toolbars), 'QGIS Desktop' should fit the display perfectly.
The Python version is selected as follows:
- The latest Python version numba is compatible with.
This Python version is installed at /usr/local/bin
.