Caution
|
This is an advanced topic. Use this only if you want to change the way the default tools are run, or if you want to use Workspace Tools that were not configured by default. |
To replace the default tools in a Domino Environment (such as JupyterLab or VS Code) with the tools in your image, you can add a startup script for each tool to your Environment. To do this, you can either:
-
Add the script to the base image.
-
Add the script to the Dockerfile instructions.
Note
|
Domino recommends using JupyterLab instead of Jupyter. It is a newer offering with superior features and performance. |
See the following instructions for these tools:
The following example script shows how the JupyterLab script must configure access to files in the Environment, set up the working directory, and define the necessary routing.
BASE_URL="/$DOMINO_PROJECT_OWNER/$DOMINO_PROJECT_NAME/notebookSession/$DOMINO_RUN_ID"
CONF_FILE="$HOME/.jupyter/jupyter_lab_config.py"
mkdir -p $(dirname "$CONF_FILE")
cat > "$CONF_FILE" << EOF
c = get_config()
# Lab has access to all files in the Environment
c.NotebookApp.notebook_dir='/'
# Lab starts in the domino working dir
c.NotebookApp.default_url='/lab/tree${DOMINO_WORKING_DIR}'
# Routing, networking and access
c.NotebookApp.base_url='${BASE_URL}/'
c.NotebookApp.tornado_settings={'headers': {'Content-Security-Policy': 'frame-ancestors *'}, 'static_url_prefix': '${BASE_URL}/static/'}
c.NotebookApp.token=u''
c.NotebookApp.iopub_data_rate_limit=10000000000
# The default cell execution timeout in nbconvert is 30 seconds, set it to a year
c.ExecutePreprocessor.timeout=365*24*60*60
EOF
After adding the script to the Environment, modify the Pluggable Workspace Tools section of the Environment definition to define the entrypoint for Workspace tool startup:
-
Go to the Environment you want to edit.
-
Click Edit Definition.
-
Go to Pluggable Workspace Tools.
-
Modify the entry so that the start field points to your tool’s launch script.