-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refine doc for run paddle on docker #1716
Conversation
40de156
to
d91ca38
Compare
Working With Docker | ||
------------------- | ||
|
||
Here we will describe the basic docker concepts that we will be using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Here we will describe the basic docker concepts that we will be using | ||
in this tutorial. | ||
|
||
- *container* is an environment for running applications |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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/paddle
in 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/paddle
in this example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
`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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 => two
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docker run --rm -v ~/workspace:/workspace paddlepaddle/paddle:0.10.0rc2 python /workspace/example.py
# check out the result:
ls ~/workspace/output
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, good to know! Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.