You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A principle here is that source code lies on the development computer (host) so that editors like Eclipse can parse the source code to support auto-completion.
33
+
34
+
## Build With Docker
22
35
23
36
### Build Environments
24
37
25
-
The pre-built build environment images are:
38
+
The lastest pre-built build environment images are:
After the build finishes, you can get output `whl` package under
46
54
`build/python/dist`.
47
55
48
-
This command mounts the source directory on the host into `/paddle` in the container, then run the build script `/paddle/paddle/scripts/docker/build.sh`
49
-
in the container. When it writes to `/paddle/build` in the container, it writes to `$PWD/build` on the host indeed.
56
+
This command will download the most recent dev image from docker hub, start a container in the backend and then run the build script `/paddle/paddle/scripts/paddle_build.sh build` in the container.
57
+
The container mounts the source directory on the host into `/paddle`.
58
+
When it writes to `/paddle/build` in the container, it writes to `$PWD/build` on the host indeed.
50
59
51
60
### Build Options
52
61
@@ -68,7 +77,6 @@ Users can specify the following Docker build arguments with either "ON" or "OFF"
68
77
|`WITH_DOC`| OFF | Build docs after build binaries. |
69
78
|`WOBOQ`| OFF | Generate WOBOQ code viewer under `build/woboq_out`|
70
79
71
-
72
80
## Docker Images
73
81
74
82
You can get the latest PaddlePaddle docker images by
@@ -144,59 +152,37 @@ docker push
144
152
kubectl ...
145
153
```
146
154
147
-
## Docker Images for Developers
148
-
149
-
We have a special docker image for developers:
150
-
`paddlepaddle/paddle:<version>-dev`. This image is also generated from
151
-
https://github.com/PaddlePaddle/buildtools
152
-
153
-
This a development image contains only the
154
-
development tools and standardizes the building procedure. Users include:
155
-
156
-
- developers -- no longer need to install development tools on the host, and can build their current work on the host (development computer).
157
-
- release engineers -- use this to build the official release from certain branch/tag on Github.com.
158
-
- document writers / Website developers -- Our documents are in the source repo in the form of .md/.rst files and comments in source code. We need tools to extract the information, typeset, and generate Web pages.
159
-
160
-
Of course, developers can install building tools on their development computers. But different versions of PaddlePaddle might require different set or version of building tools. Also, it makes collaborative debugging easier if all developers use a unified development environment.
161
-
162
-
The development image contains the following tools:
163
-
164
-
- gcc/clang
165
-
- nvcc
166
-
- Python
167
-
- sphinx
168
-
- woboq
169
-
- sshd
170
-
171
-
Many developers work on a remote computer with GPU; they could ssh into the computer and `docker exec` into the development container. However, running `sshd` in the container allows developers to ssh into the container directly.
172
-
173
-
174
-
### Development Workflow
175
-
176
-
Here we describe how the workflow goes on. We start from considering our daily development environment.
155
+
### Reading source code with woboq codebrowser
177
156
178
-
Developers work on a computer, which is usually a laptop or desktop:
157
+
For developers who are interested in the C++ source code, you can build C++ source code into HTML pages using [Woboq codebrowser](https://github.com/woboq/woboq_codebrowser).
- You can open the generated HTML files in your Web browser. Or, if you want to run a Nginx container to serve them for a wider audience, you can run:
185
166
186
-
A principle here is that source code lies on the development computer (host) so that editors like Eclipse can parse the source code to support auto-completion.
167
+
```
168
+
docker run -v $HOME/woboq_out:/usr/share/nginx/html -d -p 8080:80 nginx
169
+
```
187
170
188
-
### Reading source code with woboq codebrowser
171
+
##More Options
189
172
190
-
For developers who are interested in the C++ source code, please use -e "WOBOQ=ON" to enable the building of C++ source code into HTML pages using [Woboq codebrowser](https://github.com/woboq/woboq_codebrowser).
173
+
### Build Without Docker
191
174
192
-
- The following command builds PaddlePaddle, generates HTML pages from C++ source code, and writes HTML pages into `$HOME/woboq_out` on the host:
175
+
Follow the *Dockerfile* in the paddlepaddle repo to set up your local dev environment and run:
0 commit comments