refine doc for run paddle on docker#1716
Conversation
40de156 to
d91ca38
Compare
There was a problem hiding this comment.
Here we will describe the basic docker concepts that we will be using in this tutorial.
==>
Docker is simple as long as we understand a few basic concepts:
There was a problem hiding this comment.
It would be easier to describe image before container, as an image is a program and a container is an instance. Also, it might be helpful to add a paragraph describing why we use Docker. I propose the following:
-
image: A Docker image is a pack of software. It could contain one or more programs and all their dependencies. For example, the PaddlePaddle's Docker image includes pre-built PaddlePaddle and Python and many Python packages. We can run a Docker image directly, other than installing all these software. We can type
docker images
to list all images in the system. We can also run
docker pull paddlepaddle/paddle
to download a Docker image,
paddlepaddle/paddlein this example, from Dockerhub.com. -
container: considering a Docker image a program, a container is a "process" that runs the image. Indeed, a container is exactly an operating system process, but with a virtualized filesystem, network port space, and other virtualized environment. We can type
docker run paddlepaddle/paddle
to start a container to run a Docker image,
paddlepaddle/paddlein this example.
| `dockerhub.com <https://hub.docker.com/r/paddledev/paddle/>`_. You can find the | ||
| latest versions under "tags" tab at dockerhub.com. | ||
| 1. development image :code:`paddlepaddle/paddle:<version>-dev` | ||
| For each version of PaddlePaddle, we release 2 types of Docker images: |
| latest versions under "tags" tab at dockerhub.com. | ||
| 1. development image :code:`paddlepaddle/paddle:<version>-dev` | ||
| For each version of PaddlePaddle, we release 2 types of Docker images: | ||
| development image and production image. Production image includes |
There was a problem hiding this comment.
The development image includes all tools required to build PaddlePaddle from source code. The building result is a production image. We officially release four variants of production images, each identified by a tag:
- GPU/AVX::code:
paddlepaddle/paddle:<version>-gpu - GPU/no-AVX::code:
paddlepaddle/paddle:<version>-gpu-noavx - CPU/AVX::code:
paddlepaddle/paddle:<version> - CPU/no-AVX::code:
paddlepaddle/paddle:<version>-noavx
| ```bash | ||
| docker run -it -v $PWD:/work paddle /work/a.py | ||
| ``` | ||
| docker run -it --rm -v ~/workspace:/workspace paddlepaddle/paddle:0.10.0rc2 python /workspace/example.py |
There was a problem hiding this comment.
docker run --rm -v ~/workspace:/workspace paddlepaddle/paddle:0.10.0rc2 python /workspace/example.py
# check out the result:
ls ~/workspace/outputThere was a problem hiding this comment.
No need to use -it when you want to run a python program once. Same as below GPU version.
There was a problem hiding this comment.
Thanks, good to know! Done.
wangkuiyi
left a comment
There was a problem hiding this comment.
This document provides great raw material. Let's merge it. To release its usefulness to most AI engineers, we need further rewrite. But that could be after @helinwang 's slides and the article for CSDN.
No description provided.