Environment variables#
The runtime environment sets two variables by default
$PANGEO_ENV: name of the conda environment.$PANGEO_SCRATCH: a URL likegcs://pangeo-scratch/username/that points to a cloud storage bucket for temporary storage. This is set if the variable$PANGEO_SCRATCH_PREFIXandJUPYTERHUB_USERare detected. The prefix should be likes3://pangeo-scratch.
Every script named start-notebook*.sh will be executed at runtime if they are in the /usr/local/bin folder. They can be copied there from an install.sh script. This is useful if you need to setup more environment variables for the runtime.
Here’s an exemple of how it works :
resources/application/install.sh:
#!/bin/bash
# Copy the start-notebook file
cp resources/application/start-notebook-application.sh /usr/local/bin
# Make sure the file can be executed
chmod +x /usr/local/bin/start-notebook-application.sh
resources/application/start-notebook-application.sh:
#!/bin/bash
export SOME_VARIABLE="some value"