Skip to content

Instantly share code, notes, and snippets.

@fengye
Last active February 18, 2018 01:14
Show Gist options
  • Save fengye/181f0e7acf0f779a4d5065d019146ccd to your computer and use it in GitHub Desktop.
Save fengye/181f0e7acf0f779a4d5065d019146ccd to your computer and use it in GitHub Desktop.
# kaggle/python docker .bashrc for linux
kpython(){
docker run -v $PWD:/tmp/working -w=/tmp/working --rm -it kaggle/python python "$@"
}
ikpython() {
docker run -v $PWD:/tmp/working -w=/tmp/working --rm -it kaggle/python ipython
}
kjupyter() {
# Replace the next line in macOS for: (sleep 3 && open "http://localhost:8888")&
(sleep 3 && xdg-open "http://localhost: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" --allow-root --notebook-dir=/tmp/working
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment