"A boa aqui seria ter um script bootstrap.sh que conforme o parâmetro que vc chama o docker, roda o install e o jupyter, ou só o install ou só um jupyter.
Algo assim:
#bootstrap.sh
if [[ $1 == "-i" || $1 == "-install" ]]; then
pip install -r requirements.txt
fi
if [[ $1 == "-j" || $1 == "--jupyter" ]]; then
jupyter notebook
fi
# se n tem parametro nenhum
if [ -z "$1" ]; then
pip install -r requirements.txt && jupyter notebook
fi
e dai mudar no dockerfile
CMD bash -c "bootstrap.sh""
https://github.com/estantevirtual/dockerhub/pull/1/files#r191081557