Skip to content
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

Merged
merged 4 commits into from
Mar 29, 2017

Conversation

helinwang
Copy link
Contributor

No description provided.

Working With Docker
-------------------

Here we will describe the basic docker concepts that we will be using
Copy link
Collaborator

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:

Copy link
Contributor Author

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
Copy link
Collaborator

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.

Copy link
Contributor Author

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:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 => two

Copy link
Contributor Author

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
Copy link
Collaborator

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
Copy link
Contributor

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

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Collaborator

@wangkuiyi wangkuiyi left a 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.

@helinwang helinwang merged commit a470000 into PaddlePaddle:develop Mar 29, 2017
@helinwang helinwang deleted the docker_work branch March 29, 2017 18:24
lizexu123 pushed a commit to lizexu123/Paddle that referenced this pull request Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants