docker run ${CUDA_SO} ${DEVICES} -it paddledev/paddle:<version>-gpu
2. development image :code:`paddlepaddle/paddle:<version>-dev`
3. Use production image to release you AI application
This image has packed related develop tools and runtime
Suppose that we have a simple application program in :code:`a.py`, we can test and run it using the production image:
environment. Users and developers can use this image instead of
their own local computer to accomplish development, build,
releasing, document writing etc. While different version of paddle
may depends on different version of libraries and tools, if you
want to setup a local environment, you must pay attention to the
versions. The development image contains:
```bash
- gcc/clang
docker run -it -v $PWD:/work paddle /work/a.py
- nvcc
```
- Python
- sphinx
- woboq
- sshd
But this works only if all dependencies of :code:`a.py` are in the production image. If this is not the case, we need to build a new Docker image from the production image and with more dependencies installs.
Many developers use servers with GPUs, they can use ssh to login to
the server and run :code:`docker exec` to enter the docker
container and start their work. Also they can start a development
docker image with SSHD service, so they can login to the container
and start work.
PaddlePaddle Book
Train Model Using Python API
------------------
----------------------------
The Jupyter Notebook is an open-source web application that allows
Our official docker image provides a runtime for PaddlePaddle
you to create and share documents that contain live code, equations,
programs. The typical workflow will be as follows:
visualizations and explanatory text in a single browser.
PaddlePaddle Book is an interactive Jupyter Notebook for users and developers.
Create a directory as workspace:
We already exposed port 8888 for this book. If you want to
dig deeper into deep learning, PaddlePaddle Book definitely is your best choice.
We provide a packaged book image, simply issue the command:
.. code-block:: bash
mkdir ~/workspace
Edit a PaddlePaddle python program using your favourite editor
.. code-block:: bash
.. code-block:: bash
docker run -p 8888:8888 paddlepaddle/book
emacs ~/workspace/example.py
Then, you would back and paste the address into the local browser:
Run the program using docker:
.. code-block:: text
.. code-block:: bash
http://localhost:8888/
docker run -it --rm -v ~/workspace:/workspace paddlepaddle/paddle:0.10.0rc2 python /workspace/example.py
That's all. Enjoy your journey!
Or if you are using GPU for training:
Development Using Docker
.. code-block:: bash
------------------------
Developers can work on PaddlePaddle using Docker. This allows
nvidia-docker run -it --rm -v ~/workspace:/workspace paddlepaddle/paddle:0.10.0rc2-gpu python /workspace/example.py
developers to work on different platforms -- Linux, Mac OS X, and
Windows -- in a consistent way.
1. Build the Development Docker Image
Above commands will start a docker container by running :code:`python
/workspace/example.py`. It will stop once :code:`python
/workspace/example.py` finishes.
.. code-block:: bash
Another way is to tell docker to start a :code:`/bin/bash` session and