Skip to content

Commit ee1b882

Browse files
authored
[docs] [install] [docker] update English Documents , Supplementary notes in Chinese (#5413)
* [docs] [install] [docker] update English Documents , Supplementary notes in Chinese * [docs][install][docker] Fix code style check failed
1 parent 7633257 commit ee1b882

File tree

2 files changed

+40
-3
lines changed

2 files changed

+40
-3
lines changed

docs/install/docker/linux-docker.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
- 在本地主机上[安装 Docker](https://hub.docker.com/search/?type=edition&offering=community)
1010

11-
- 如需在 Linux 开启 GPU 支持, 需提前[安装 nvidia-container-toolkit](https://github.com/NVIDIA/nvidia-docker)
11+
- 如需在 Linux 开启 GPU 支持, 需提前[安装 nvidia-container-toolkit](https://github.com/NVIDIA/nvidia-docker)[GPU 驱动](https://docs.nvidia.com/datacenter/tesla/tesla-installation-notes/index.html)
1212
* 请通过 docker -v 检查 Docker 版本。对于 19.03 之前的版本,您需要使用 nvidia-docker 和 nvidia-docker 命令;对于 19.03 及之后的版本,您将需要使用 nvidia-container-toolkit 软件包和 --gpus all 命令。这两个选项都记录在上面链接的网页上。
1313

1414
注 nvidia-container-toolkit 安装方法:

docs/install/docker/linux-docker_en.md

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,42 @@
88

99
- On the local host [Install Docker](https://hub.docker.com/search/?type=edition&offering=community)
1010

11-
- To enable GPU support on Linux, please [Install nvidia-docker](https://github.com/NVIDIA/nvidia-docker)
11+
- To enable GPU support on Linux, please [Install nvidia-container-toolkit](https://github.com/NVIDIA/nvidia-docker) and [GPU driver](https://docs.nvidia.com/datacenter/tesla/tesla-installation-notes/index.html)
12+
13+
* Please check the Docker version with docker -v. For versions prior to 19.03, You need to use the nvidia-docker and nvidia-docker commands; For versions 19.03 and later, you will need to use the nvidia-container-toolkit package and the --gpus all command. Both of these options are documented on the page linked above.
14+
15+
Note nvidia-container-toolkit installation method:
16+
* Ubuntu
17+
* Adding Repositories and Keys
18+
```bash
19+
distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
20+
&& curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - \
21+
&& curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
22+
```
23+
* install nvidia-container-toolkit
24+
```bash
25+
sudo apt update
26+
sudo apt install nvidia-container-toolkit
27+
```
28+
* restart docker
29+
```bash
30+
sudo systemctl restart docker
31+
```
32+
* Centos
33+
* Adding Repositories and Keys
34+
```bash
35+
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
36+
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.repo | sudo tee /etc/yum.repos.d/nvidia-docker.repo
37+
```
38+
* install nvidia-container-toolkit
39+
```bash
40+
sudo yun update
41+
sudo yum install -y nvidia-container-toolkit
42+
```
43+
* restart docker
44+
```bash
45+
sudo systemctl restart docker
46+
```
1247

1348
## Installation steps
1449

@@ -78,9 +113,11 @@
78113

79114

80115
```
81-
nvidia-docker run --name [Name of container] -it -v $PWD:/paddle <imagename> /bin/bash
116+
docker run --gpus all --name [Name of container] -it -v $PWD:/paddle <imagename> /bin/bash
82117
```
83118

119+
> --gpus Specify the gpu device ('"device=0,2"':Represents the use of GPUs 0 and 2; all: Represents the use of all GPUs), please see [Docker docs](https://docs.docker.com/engine/reference/commandline/run/#access-an-nvidia-gpu);
120+
84121
> --name [Name of container] set name of Docker;
85122

86123

0 commit comments

Comments
 (0)