提交 82fade32 编写于 作者: L liaogang

update

上级 9d355c88
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
只需要在命令行窗口里运行: 只需要在命令行窗口里运行:
```bash ```bash
docker run -d -p 8888:8888 paddlepaddle/book docker run -d -p 8888:8888 paddlepaddle/book:0.10.0
``` ```
会从DockerHub.com下载和运行本书的Docker image。阅读和在线编辑本书请在浏览器里访问 http://localhost:8888 。 会从DockerHub.com下载和运行本书的Docker image。阅读和在线编辑本书请在浏览器里访问 http://localhost:8888 。
...@@ -30,7 +30,7 @@ docker run -d -p 8888:8888 paddlepaddle/book ...@@ -30,7 +30,7 @@ docker run -d -p 8888:8888 paddlepaddle/book
如果您访问DockerHub.com很慢,可以试试我们的另一个镜像docker.paddlepaddle.org: 如果您访问DockerHub.com很慢,可以试试我们的另一个镜像docker.paddlepaddle.org:
```bash ```bash
docker run -d -p 8888:8888 docker.paddlepaddle.org/book docker run -d -p 8888:8888 docker.paddlepaddle.org/book:0.10.0
``` ```
### 使用GPU训练 ### 使用GPU训练
...@@ -38,13 +38,13 @@ docker run -d -p 8888:8888 docker.paddlepaddle.org/book ...@@ -38,13 +38,13 @@ docker run -d -p 8888:8888 docker.paddlepaddle.org/book
本书默认使用CPU训练,若是要使用GPU训练,使用步骤会稍有变化。为了保证GPU驱动能够在镜像里面正常运行,我们推荐使用[nvidia-docker](https://github.com/NVIDIA/nvidia-docker)来运行镜像。请先安装nvidia-docker,之后请运行: 本书默认使用CPU训练,若是要使用GPU训练,使用步骤会稍有变化。为了保证GPU驱动能够在镜像里面正常运行,我们推荐使用[nvidia-docker](https://github.com/NVIDIA/nvidia-docker)来运行镜像。请先安装nvidia-docker,之后请运行:
```bash ```bash
nvidia-docker run -d -p 8888:8888 paddlepaddle/book:0.10.0rc2-gpu nvidia-docker run -d -p 8888:8888 paddlepaddle/book:0.10.0-gpu
``` ```
或者使用国内的镜像请运行: 或者使用国内的镜像请运行:
```bash ```bash
nvidia-docker run -d -p 8888:8888 docker.paddlepaddle.org/book:0.10.0rc2-gpu nvidia-docker run -d -p 8888:8888 docker.paddlepaddle.org/book:0.10.0-gpu
``` ```
还需要将以下代码 还需要将以下代码
......
# Deep Learning with PaddlePaddle
1. [Fit a Line](http://book.paddlepaddle.org/01.fit_a_line/index.en.html)
1. [Recognize Digits](http://book.paddlepaddle.org/02.recognize_digits/index.en.html)
1. [Image Classification](http://book.paddlepaddle.org/03.image_classification/index.en.html)
1. [Word to Vector](http://book.paddlepaddle.org/04.word2vec/index.en.html)
1. [Understand Sentiment](http://book.paddlepaddle.org/05.understand_sentiment/index.en.html)
1. [Label Semantic Roles](http://book.paddlepaddle.org/06.label_semantic_roles/index.en.html)
1. [Machine Translation](http://book.paddlepaddle.org/07.machine_translation/index.en.html)
1. [Recommender System](http://book.paddlepaddle.org/08.recommender_system/index.en.html)
## Running the Book
This book you are reading is interactive -- each chapter can run as a Jupyter Notebook.
We packed this book, Jupyter, PaddlePaddle, and all dependencies into a Docker image. So you don't need to install anything except Docker. If you are using Windows, please follow [this installation guide](https://www.docker.com/docker-windows). If you are running Mac, please follow [this](https://www.docker.com/docker-mac). For various Linux distros, please refer to https://www.docker.com. If you are using Windows or Mac, you might want to give Docker [more memory and CPUs/cores](http://stackoverflow.com/a/39720010/724872).
Just type
```bash
docker run -d -p 8888:8888 paddlepaddle/book:0.10.0
```
This command will download the pre-built Docker image from DockerHub.com and run it in a container. Please direct your Web browser to http://localhost:8888 to read the book.
If you are living in somewhere slow to access DockerHub.com, you might try our mirror server docker.paddlepaddle.org:
```bash
docker run -d -p 8888:8888 docker.paddlepaddle.org/book:0.10.0
```
### Training with GPU
By default we are using CPU for training, if you want to train with GPU, the steps are a little different.
To make sure GPU can be successfully used from inside container, please install [nvidia-docker](https://github.com/NVIDIA/nvidia-docker). Then run:
```bash
nvidia-docker run -d -p 8888:8888 paddlepaddle/book:0.10.0-gpu
```
Or you can use the image registry mirror in China:
```bash
nvidia-docker run -d -p 8888:8888 docker.paddlepaddle.org/book:0.10.0-gpu
```
Change the code in the chapter that you are reading from
```python
paddle.init(use_gpu=False, trainer_count=1)
```
to:
```python
paddle.init(use_gpu=True, trainer_count=1)
```
## Contribute
Your contribution is welcome! Please feel free to file Pull Requests to add your chapter as a directory under `/pending`. Once it is going stable, the community would like to move it to `/`.
To write, run, and debug your chapters, you will need Python 2.x, Go >1.5. You can build the Docker image using [this script](https://github.com/PaddlePaddle/book/blob/develop/.tools/convert-markdown-into-ipynb-and-test.sh).
This tutorial is contributed by <a xmlns:cc="http://creativecommons.org/ns#" href="http://book.paddlepaddle.org" property="cc:attributionName" rel="cc:attributionURL">PaddlePaddle</a>, and licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册