-
Olivier Benz authored
- Copy source-installation from nvsi image - Add package ripgrep
Olivier Benz authored- Copy source-installation from nvsi image - Add package ripgrep
Notes
This docker stack uses modified startup scripts from
jupyter/docker-stacks.
Tweaks
In comparison to jupyter/docker-stacks and/or rocker-org/rocker-versioned2, these images are tweaked as follows:
Jupyter startup scripts
Shell script /usr/local/bin/start.sh is modified to
- allow bind mounting of a home directory.
- reset
CODE_WORKDIR
for customNB_USER
s.
Jupyter startup hooks
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-code-server.sh to update code-server settings.
- /usr/local/bin/before-notebook.d/71-tensorboard.sh to use Jupyter Server Proxy for TensorBoard.
-
/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
.
Custom scripts
-
/usr/local/bin/busy is executed during
screen
/tmux
sessions to update the last-activity timestamps on JupyterHub to prevent the JupyterHub Idle Culler Service from shutting down idle or long-running Jupyter Notebook servers, allowing for unattended computations. - /usr/local/bin/python-kernel.sh to start a custom conda/virtual env Python kernel.
Environment variables
-
CS_DISABLE_GETTING_STARTED_OVERRIDE=1
: code-server: Hide the coder/coder promotion in Help: Getting Started
Versions:
MOJO_VERSION
PYTHON_VERSION
JUPYTERHUB_VERSION
JUPYTERLAB_VERSION
CODE_SERVER_VERSION
NEOVIM_VERSION
GIT_VERSION
GIT_LFS_VERSION
PANDOC_VERSION
-
QUARTO_VERSION
(scipy image)
Miscellaneous:
-
BASE_IMAGE
: Its very base, a Docker Official Image. -
PARENT_IMAGE
: The image it was derived from. MODULAR_HOME
-
BUILD_DATE
: The date it was built (ISO 8601 format). -
CTAN_REPO
: The CTAN mirror URL. (scipy image)
Shell
The default shell is Zsh, further enhanced with
- Framework: Oh My Zsh
- Theme: Powerlevel10k
- Font: MesloLGS NF
Extensions (code-server)
Pre-installed extensions are treated as built-in and therefore cannot be updated at user level.
TeX packages (scipy image)
In addition to the TeX packages used in
rocker/verse,
jupyter/scipy-notebook
and required for nbconvert
, the
packages requested by the community
are installed.
Settings
Default
-
IPython:
- Only enable figure formats
svg
andpdf
for IPython.
- 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
- Mojo LSP Server
-
code-server
- Text Editor > Tab Size: 2
- Extensions > GitLens — Git supercharged
- General > Show Welcome On Install: false
- General > Show Whats New After Upgrade: false
- Graph commands disabled where possible
- Application > Telemetry: Telemetry Level: off
- Features > Terminal > Integrated: Font Family: MesloLGS NF
- Workbench > Appearance > Color Theme: Default Dark+
- 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
- Set
-
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 an upwards arrow?: (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: (3) 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:
- Bash: /etc/profile.d/00-reset-path.sh
and /etc/skel/.profile
- Update
PATH
for login shells, e.g. when started as a server associated with JupyterHub.
- Update
Customise
- 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
- code-server: Manage > Settings
- 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
- Bash
- Edit
~/.bashrc
.
- Edit
Python
The Python version is selected as follows: The latest Python version Numba, PyTorch and TensorFlow are compatible with.
This Python version is installed at /usr/local/bin
.