Skip to content

Instantly share code, notes, and snippets.

@frbl
Created May 17, 2017 22:01
Show Gist options
  • Save frbl/d935af830762c08df671f9227292f502 to your computer and use it in GitHub Desktop.
Save frbl/d935af830762c08df671f9227292f502 to your computer and use it in GitHub Desktop.
General script to run a notebook server in the current directory (uses docker)
#!/usr/bin/env sh
lib_dir=~/.R/lib/notebooks
mkdir -p $lib_dir
`sleep 3; open http://127.0.0.1:8888` &
docker run --rm -it \
-p 127.0.0.1:8888:8888 \
-v `pwd`:/home/jovyan/work \
-v $lib_dir:/usr/local/spark-2.1.0-bin-hadoop2.7/R/lib \
frbl/docker-notebook \
start-notebook.sh \
--NotebookApp.token=''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment