docker run ${CUDA_SO} ${DEVICES} -it paddledev/paddle:<version>-gpu
Run the program using docker:
3. Use production image to release you AI application
.. code-block:: bash
Suppose that we have a simple application program in :code:`a.py`, we can test and run it using the production image:
```bash
docker run -it --rm -v ~/workspace:/workspace paddlepaddle/paddle:0.10.0rc2 python /workspace/example.py
docker run -it -v $PWD:/work paddle /work/a.py
```
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.
Or if you are using GPU for training:
.. code-block:: bash
PaddlePaddle Book
nvidia-docker run -it --rm -v ~/workspace:/workspace paddlepaddle/paddle:0.10.0rc2-gpu python /workspace/example.py
------------------
The Jupyter Notebook is an open-source web application that allows
Above commands will start a docker container by running :code:`python
you to create and share documents that contain live code, equations,
/workspace/example.py`. It will stop once :code:`python
visualizations and explanatory text in a single browser.
/workspace/example.py` finishes.
PaddlePaddle Book is an interactive Jupyter Notebook for users and developers.
Another way is to tell docker to start a :code:`/bin/bash` session and
We already exposed port 8888 for this book. If you want to
run PaddlePaddle program interactively:
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
docker run -it -v ~/workspace:/workspace paddlepaddle/paddle:0.10.0rc2 /bin/bash
# now we are inside docker container
cd /workspace
python example.py
Running with GPU is identical:
.. code-block:: bash
.. code-block:: bash
docker run -p 8888:8888 paddlepaddle/book
nvidia-docker run -it -v ~/workspace:/workspace paddlepaddle/paddle:0.10.0rc2-gpu /bin/bash
# now we are inside docker container
cd /workspace
python example.py
Then, you would back and paste the address into the local browser: