Skip to content

Instantly share code, notes, and snippets.

@mchirico
Created April 9, 2016 13:47
Show Gist options
  • Save mchirico/f54a9578e017e05690ac7b6ca1354363 to your computer and use it in GitHub Desktop.
Save mchirico/f54a9578e017e05690ac7b6ca1354363 to your computer and use it in GitHub Desktop.
jupyter notebook for Kaggle Docker Image
#!/bin/bash
# Change to your directory. Change this for directory.
cd /Users/mchirico/Dropbox/kaggle/iris
# Change machine environment
eval $(docker-machine env big2)
# Function to launch browser and container.
kjupyter() {
(sleep 3 && open "http://$(docker-machine ip big2):8888")&
docker run -v $PWD:/tmp/working -w=/tmp/working -p 8888:8888 --rm -it kaggle/python jupyter notebook --no-browser --ip="0.0.0.0" --notebook-dir=/tmp/working/s\
rc
}
# Execute function
kjupyter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment