Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
| deeplearning:docker [2019/01/25 14:34] – admin | deeplearning:docker [2019/02/05 12:48] (Version actuelle) – [Terminologies] admin | ||
|---|---|---|---|
| Ligne 6: | Ligne 6: | ||
| In this tutorial we will learn how to use docker with GPU by running a simple Tesnforflow program. | In this tutorial we will learn how to use docker with GPU by running a simple Tesnforflow program. | ||
| </ | </ | ||
| + | |||
| + | ===== Terminologies ===== | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| We will the latest TF GPU images. | We will the latest TF GPU images. | ||
| Ligne 19: | Ligne 25: | ||
| <code bash> | <code bash> | ||
| $ docker pull tensorflow/ | $ docker pull tensorflow/ | ||
| + | </ | ||
| + | Before running a container, we suppose that we have a folder named '' | ||
| + | |||
| + | <code bash> | ||
| + | $ ls . | ||
| + | app | ||
| </ | </ | ||
| Ligne 28: | Ligne 40: | ||
| Woot! we gain root shell inside the container! | Woot! we gain root shell inside the container! | ||
| - | * '' | + | * **-it** means interactive |
| - | * '' | + | * **-- rm** means delete the container when finished |
| Ligne 38: | Ligne 50: | ||
| 1_hello_tensorflow.ipynb | 1_hello_tensorflow.ipynb | ||
| </ | </ | ||
| - | These files are inside the containers. Host files are not visible inside the container. We will see later how to expose theme. | + | These files are inside the containers. Host files ('' |
| We can run directly python shipped withe container: | We can run directly python shipped withe container: | ||
| Ligne 50: | Ligne 62: | ||
| </ | </ | ||
| + | Lets try to access to our folder '' | ||
| + | <code bash> | ||
| + | $ nvidia-docker run -it --rm -v app:/app tensorflow/ | ||
| + | # ls /app | ||
| + | tfexample.py | ||
| + | </ | ||
| + | * '' | ||
| + | |||
| + | Now, we can run directly our '' | ||
| + | |||
| + | <code bash> | ||
| + | $ nvidia-docker run -it --rm -v app:/app tensorflow/ | ||
| + | </ | ||
| + | |||
| + | By default this image run jupyter notebook if no program is given. **BUT** we need to expose the used port '' | ||
| + | <code bash> | ||
| + | nvidia-docker run -it --rm -v app:/app -p8888:8888 tensorflow/ | ||
| + | [I 14: | ||
| + | [I 14: | ||
| + | [I 14: | ||
| + | [I 14: | ||
| + | [I 14: | ||
| + | [C 14: | ||
| + | | ||
| + | Copy/paste this URL into your browser when you connect for the first time, | ||
| + | to login with a token: | ||
| + | http:// | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | Replace '' | ||
| + | |||
| + | |||
| + | {{ : | ||
| + | |||
| + | One can the open and run notebook files. For more information about how to use Jupyter notebook please visit this page: | ||