Files
docker-stacks/minimal-notebook/start-notebook.sh
Peter Parente ad99f8c74f Remove trivial env vars, doc command line args
* Remove PORT and INTERFACE env vars which can conflict with other systems (e.g., Mesos)
* Document command line pass-through to start-notebook.sh

(c) Copyright IBM Corp. 2015
2015-10-19 09:36:28 -04:00

16 lines
398 B
Bash
Executable File

#!/bin/bash
# Change UID of NB_USER to NB_UID if it does not match
if [ "$NB_UID" != $(id -u $NB_USER) ] ; then
usermod -u $NB_UID $NB_USER
chown -R $NB_UID $CONDA_DIR
fi
# Enable sudo if requested
if [ ! -z "$GRANT_SUDO" ]; then
echo "$NB_USER ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/notebook
fi
# Start the notebook server
exec su $NB_USER -c "env PATH=$PATH jupyter notebook $@"