DOCKER.md 1.7 KB
Newer Older
1
# Docker compilation environment preparation
M
MRXLT 已提交
2

3
([简体中文](./DOCKER_CN.md)|English)
M
MRXLT 已提交
4

5
## Environmental requirements
M
MRXLT 已提交
6

7 8
+ Docker is installed on the development machine.
+ Compiling the GPU version requires nvidia-docker.
M
MRXLT 已提交
9

10
## Dockerfile
M
MRXLT 已提交
11

12
[CPU Version Dockerfile](../tools/Dockerfile)
M
MRXLT 已提交
13

14
[GPU Version Dockerfile](../tools/Dockerfile.gpu)
M
MRXLT 已提交
15

16
## Instructions
M
MRXLT 已提交
17

18
### Building Docker Image
M
MRXLT 已提交
19

20 21 22
Create a new directory and copy the Dockerfile to this directory.

Run
M
MRXLT 已提交
23 24 25 26 27

```bash
docker build -t serving_compile:cpu .
```

28
Or
M
MRXLT 已提交
29 30 31 32 33

```bash
docker build -t serving_compile:cuda9 .
```

34
## Enter Docker Container
M
MRXLT 已提交
35

36
CPU Version please run
M
MRXLT 已提交
37 38 39 40 41

```bash
docker run -it serving_compile:cpu bash
```

42
GPU Version please run
M
MRXLT 已提交
43 44 45 46

```bash
docker run -it --runtime=nvidia -it serving_compile:cuda9 bash
```
M
add env  
MRXLT 已提交
47

48
##  List of supported environments compiled by Docker
M
add env  
MRXLT 已提交
49

50
The list of supported environments is as follows::
M
MRXLT 已提交
51

52
| System Environment Supported by CPU Docker Compiled Executables |
M
add env  
MRXLT 已提交
53 54 55 56
| -------------------------- |
| Centos6                    |
| Centos7                    |
| Ubuntu16.04                |
M
MRXLT 已提交
57
| Ubuntu18.04               |
M
add env  
MRXLT 已提交
58 59 60



61
| System Environment Supported by GPU Docker Compiled Executables |
M
add env  
MRXLT 已提交
62
| ---------------------------------- |
M
MRXLT 已提交
63
| Centos6_cuda9_cudnn7                       |
M
MRXLT 已提交
64
| Centos7_cuda9_cudnn7                  |
M
MRXLT 已提交
65 66
| Ubuntu16.04_cuda9_cudnn7                       |
| Ubuntu16.04_cuda10_cudnn7                  |
M
MRXLT 已提交
67

M
MRXLT 已提交
68

M
add env  
MRXLT 已提交
69

70 71 72
**Remarks:**
+ If you cannot find libcrypto.so.10 and libssl.so.10 when you execute the pre-compiled version, you can change /usr/lib64/libssl.so.10 and /usr/lib64/libcrypto.so in the Docker environment. 10 Copy to the directory where the executable is located.
+ CPU pre-compiled version can only be executed on CPU machines, GPU pre-compiled version can only be executed on GPU machines.