HUB
Sign inSign up

inemo/dl_toolbox

By inemo

•Updated over 1 year ago

Image
0

700

inemo/dl_toolbox repository overview

Dockerized version of Jupyter with installed Pytorch, TensorFlow, Sklearn, Allennlp, Deeppavlov, NLTK, Gensim, Pandas, etc.

Versions:

  • latest tag - python 3.7.4 + cuda 10.1
  • cuda11.0 - python 3.8.6 + cuda 11.0

⁠Run

First, install nvidia-docker: https://github.com/NVIDIA/nvidia-docker⁠

Then, run the container:

nvidia-docker run -ti --rm \
    -v `pwd`:/notebook \
    -p 8888:8888 \
    --shm-size=1024m \
    windj007/jupyter-keras-tools

After that, jupyter notebook will be available at http://<hostname>:8888/.

Or, with full options and authentication (for copy-paste convenience :)):

export YOUR_HASHED_PASSWORD=<your hashed password>;
nvidia-docker run -ti --rm \
    -e "HASHED_PASSWORD=$YOUR_HASHED_PASSWORD" \
    -e "SSL=1" \
    -v /folder/with/your/certs:/jupyter/certs \
    -v `pwd`:/notebook \
    -p 8888:8888 \
    --shm-size=1024m \ 
    windj007/jupyter-keras-tools

This option --shm-size=1024m epands the available shared memory, whithout it, sklearn.grid_search.GridSearchCV may fail if you train large models.

After that, jupyter notebook will be available at https://<hostname>:8888/.

⁠Build from Scratch

git clone https://github.com/inemo/docker-jupyter-keras-tools
cd docker-jupyter-keras-tools
docker build -t inemo/dl_toolbox .

⁠Authentication

You may want to run this container on a server which is accessible via Internet. To protect it, you'd better provide a password and SSL certificate and key.

⁠1. Create certificates

Use openssl to generate a self-signed certificate. If you always forget how to do this (like I do), you can use a simple utility: https://github.com/windj007/ssl-utils⁠

⁠2. Make a hashed password

Jupyter does not store plain password. It uses a hashed version instead. To make a hashed version of you password, please run:

$ docker run -ti --rm inemo/dl_toolbox /hashpwd.py
Enter password: 
Verify password: 
<your hashed password>
$ YOUR_HASHED_PASSWORD="<your hashed password>" # save it to a variable for convenience
⁠3. Run the container

You have to pass the hashed password and tell jupyter to enable SSL and mount a volume with your cert and key. A sample command to run protected notebook (cuda-related options ommitted for conciseness):

docker run -ti --rm \
    -e "HASHED_PASSWORD=$YOUR_HASHED_PASSWORD" \
    -e "SSL=1" \
    -v /folder/with/your/certs:/jupyter/certs \
    inemo/dl_toolbox

After that, you will have to access Jupyter with explicit https:// in address .

Tag summary

Content type

Image

Digest

sha256:e0fd9537e…

Size

15.4 GB

Last updated

over 1 year ago

docker pull inemo/dl_toolbox