Posted at

直感Deep Learning, dockerに挑戦(1) pull 書籍通り

More than 1 year has passed since last update.

$ docker pull floydhub/dl-docker:cpu


cpu: Pulling from floydhub/dl-docker
6c953ac5d795: Pull complete
3eed5ff20a90: Pull complete
f8419ea7c1b5: Pull complete
51900bc9e720: Pull complete
a3ed95caeb02: Pull complete
46bb9e850895: Pull complete
e07079b02cd9: Pull complete
45bd5a47614d: Pull complete
4ba5917b4dc5: Pull complete
e197926eeea3: Pull complete
376f5cc0ea36: Pull complete
590b9a27bdc2: Pull complete
4377eaedc7bc: Pull complete
ed3b9bf2301a: Pull complete
aac3c3ae382f: Pull complete
13397679ef8c: Pull complete
62d30df21bd1: Pull complete
3329da8ba1ff: Pull complete
669806fb3edd: Pull complete
43a371cb28cc: Pull complete
ffa9a85a3cc7: Pull complete
Digest: sha256:377e9443b323ff2346d33b096f3bd4b7ae0a707823dd8430e093cccf59e021e9
Status: Downloaded newer image for floydhub/dl-docker:cpu
$ docker run -it -p 8888:8888 -p 6006:6006 floydhub/dl-docker:cpu bash

root@01dc6ad0394a:~# ls
caffe iTorch run_jupyter.sh torch
root@01dc6ad0394a:~# ls -al
total 52
drwx------ 1 root root 4096 Jun 13 2016 .
drwxr-xr-x 1 root root 4096 Sep 20 06:31 ..
-rw-r--r-- 1 root root 3106 Feb 20 2014 .bashrc
drwx------ 1 root root 4096 Jun 13 2016 .cache
drwxr-xr-x 3 root root 4096 Jun 13 2016 .cmake
drwxr-xr-x 8 root root 4096 Jun 13 2016 .ipython
drwxr-xr-x 2 root root 4096 Jun 13 2016 .jupyter
-rw-r--r-- 1 root root 140 Feb 20 2014 .profile
-rw-r--r-- 1 root root 178 Jun 13 2016 .theanorc
drwxr-xr-x 16 root root 4096 Jun 13 2016 caffe
drwxr-xr-x 7 root root 4096 Jun 13 2016 iTorch
-rw-r--r-- 1 root root 733 Jun 13 2016 run_jupyter.sh
drwxr-xr-x 1 root root 4096 Jun 13 2016 torch
root@01dc6ad0394a:~# sh run_jupyter.sh --allow-root
The Jupyter HTML Notebook.

This launches a Tornado based HTML Notebook Server that serves up an
HTML5/Javascript Notebook client.

Subcommands
-----------

Subcommands are launched as `jupyter-notebook cmd [args]`. For information on
using subcommand 'cmd', do: `jupyter-notebook cmd -h`.

list
List currently running notebook servers.

Options
-------

Arguments that take values are actually convenience aliases to full
Configurables, whose aliases are listed on the help line. For more information
on full configurables, see '--help-all'.

--script
DEPRECATED, IGNORED
--pylab
DISABLED: use %pylab or %matplotlib in the notebook to enable matplotlib.
--debug
set log level to logging.DEBUG (maximize logging output)
--no-browser
Don't open the notebook in a browser after startup.
-y
Answer yes to any questions instead of prompting.
--no-mathjax
Disable MathJax

MathJax is the javascript library Jupyter uses to render math/LaTeX. It is
very large, so you may want to disable it if you have a slow internet
connection, or for offline use of the notebook.

When disabled, equations etc. will appear as their untransformed TeX source.
--no-script
DEPRECATED, IGNORED
--generate-config
generate default config file
--certfile=<Unicode> (NotebookApp.certfile)
Default: u''
The full path to an SSL/TLS certificate file.
--ip=<Unicode> (NotebookApp.ip)
Default: 'localhost'
The IP address the notebook server will listen on.
--pylab=<Unicode> (NotebookApp.pylab)
Default: 'disabled'
DISABLED: use %pylab or %matplotlib in the notebook to enable matplotlib.
--log-level=<Enum> (Application.log_level)
Default: 30
Choices: (0, 10, 20, 30, 40, 50, 'DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL')
Set the log level by value or name.
--port-retries=<Integer> (NotebookApp.port_retries)
Default: 50
The number of additional ports to try if the specified port is not
available.
--notebook-dir=<Unicode> (NotebookApp.notebook_dir)
Default: u''
The directory to use for notebooks and kernels.
--keyfile=<Unicode> (NotebookApp.keyfile)
Default: u''
The full path to a private key file for usage with SSL/TLS.
--client-ca=<Unicode> (NotebookApp.client_ca)
Default: u''
The full path to a certificate authority certifificate for SSL/TLS client
authentication.
--config=<Unicode> (JupyterApp.config_file)
Default: u''
Full path of a config file.
--port=<Integer> (NotebookApp.port)
Default: 8888
The port the notebook server will listen on.
--transport=<CaselessStrEnum> (KernelManager.transport)
Default: 'tcp'
Choices: [u'tcp', u'ipc']
--browser=<Unicode> (NotebookApp.browser)
Default: u''
Specify what command to use to invoke a web browser when opening the
notebook. If not specified, the default browser will be determined by the
`webbrowser` standard library module, which allows setting of the BROWSER
environment variable to override it.

To see all available configurables, use `--help-all`

Examples
--------

jupyter notebook # start the notebook
jupyter notebook --certfile=mycert.pem # use SSL/TLS certificate

[C 06:34:04.978 NotebookApp] Bad config encountered during initialization:
[C 06:34:04.978 NotebookApp] Unrecognized flag: '--allow-root'

shで実行権のないshell scriptを実行するのは少し嫌かも。

root@01dc6ad0394a:~# chmod +x run_jupyter.sh 

root@01dc6ad0394a:~# ./run_jupyter.sh
[I 06:36:56.525 NotebookApp] Copying /root/.ipython/kernels -> /root/.local/share/jupyter/kernels
[I 06:36:56.536 NotebookApp] Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret
[W 06:36:56.549 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
[W 06:36:56.549 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using authentication. This is highly insecure and not recommended.
[I 06:36:56.558 NotebookApp] Serving notebooks from local directory: /root
[I 06:36:56.558 NotebookApp] 0 active kernels
[I 06:36:56.558 NotebookApp] The Jupyter Notebook is running at: http://[all ip addresses on your system]:8888/
[I 06:36:56.559 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

^cで止める。
--