Last active
October 3, 2018 08:13
-
-
Save Nikasa1889/6c35011236bb6b5c1213fcff33b008f4 to your computer and use it in GitHub Desktop.
Run an Adhoc Jupyter service for datascience
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run the following command to start jupyter with custom password | |
## The current directory will be mapped to the /home/jovyan in the docker | |
## User is granted root access | |
## New password can be set using its hash, hash of password can be obtained by: | |
### from IPython.lib import passwd | |
### passwd("this_is_a_password") #Output: 'sha1:9743a64265c5:5775f49cb5577d50234260a661cb520b1dc07ed3' | |
docker run -p 8888:8888 --user root -e NB_GID=100 -e GRANT_SUDO=yes -v "$PWD":/home/jovyan jupyter/scipy-notebook:hoangmt start-notebook.sh --NotebookApp.password='sha1:9743a64265c5:5775f49cb5577d50234260a661cb520b1dc07ed3' -d | |
# Save changes to the running container by commiting its image | |
# get hash of the container to be commited | |
docker ls | |
# Assume 986ec99cd7ce is the container you want to save | |
docker commit 986ec99cd7ce jupyter/scipy-notebook:hoangmt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment