Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Commit 25bd57c

Browse files
DawnStonecrlishka
authored andcommitted
removed contrib/docker/Dockerfile for gcc 4.8 for Ubuntu 16.04 - not tested (#648)
updated the contrib/docker/README.md to align with the latest updates updated formatting for contrib/docker/README.md renamed INSTALL to INSTALL.md updated formatting for INSTALL.md
1 parent 8fc9dd6 commit 25bd57c

File tree

3 files changed

+70
-46
lines changed

3 files changed

+70
-46
lines changed

INSTALL renamed to INSTALL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ General Instructions
3636
These instructions assume that your system has been prepared in accordance
3737
with the above prerequisites.
3838

39+
```
3940
$ cd ngraph
4041
$ mkdir build
4142
$ cd build
4243
$ cmake .. \
4344
-DCMAKE_C_COMPILER=<path to C compiler> \
4445
-DCMAKE_CXX_COMPILER=<path to C++ compiler>
4546
$ make -j install
47+
```

contrib/docker/Dockerfile.ngraph.ubuntu1604_gcc48

Lines changed: 0 additions & 39 deletions
This file was deleted.

contrib/docker/README.md

Lines changed: 68 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ The `Makefile` provides targets for:
1010
* Building ngraph and running unit tests in this cloned repo, mounted into the docker image of the _reference-OS_
1111
* Starting an interactive shell in the _reference-OS_ docker image, with the cloned repo available for manual builds and unit testing
1212

13-
The _make targets_ are designed to handle all aspects of building the _reference-OS_ docker image, running ngraph builds and unit testing in it, and opening up a session in the docker image for interactive use. You should not need to issue any manual commands (unless you want to). In addition the `Dockerfile.ngraph_cpu` provides a description of how the _reference-OS_ is built, should you want to build your own server or docker image.
13+
The _make_ targets are designed to handle all aspects of building the _reference-OS_ docker image, running ngraph builds and unit testing in it, and opening up a session in the docker image for interactive use. You should not need to issue any manual commands (unless you want to). In addition the `Dockerfile.ngraph.*` files provide a description of how each _reference-OS_ environment is built, should you want to build your own server or docker image.
1414

1515
## Prerequisites
1616

17-
In order to use the make targets, you will need to do the following:
17+
In order to use the _make_ targets, you will need to do the following:
1818

1919
* Have docker installed on your computer with the docker daemon running.
2020
* These scripts assume that you are able to run the `docker` command without using `sudo`. You will need to add your account to the `docker` group so this is possible.
@@ -23,13 +23,13 @@ In order to use the make targets, you will need to do the following:
2323

2424
## Make Targets
2525

26-
The _make targets_ are designed to provide easy commands to run actions using the docker image. All _make targets_ should be issued on the host OS, and _not_ in a docker image.
26+
The _make_ targets are designed to provide easy commands to run actions using the docker image. All _make_ targets should be issued on the host OS, and _not_ in a docker image.
2727

28-
Most make targets are structured in the form `<action>_<compiler>`. The `<action>` indicates what you want to do (e.g. build, check, install), while the `<compiler>` indicates what you want to build with (i.e. gcc or clang).
28+
Most _make_ targets are structured in the form `<action>_<compiler>`. The `<action>` indicates what you want to do (e.g. build, check, install), while the `<compiler>` indicates what you want to build with (i.e. gcc or clang).
2929

3030
* In general, you simply need to run the command **`make check_all`**. This first makes the `build_docker_ngraph` target as a dependency. Then it makes the `build_*` and `check_*` targets, which will build ngraph using _cmake_ and _make_ and then run unit testing. Please keep in mind that `make check_*` targets do not work when your working directory is in an NFS filesystem that uses _root squash_ (see **Notes** section below).
3131

32-
* Two builds are supported: building with `gcc` and `clang`. Targets are named `*_gcc` and `*_clang` when they refer to building with a specific compiler, and the `*_all` targets are available to build with both compilers. Output directories are BUILD-GCC and BUILD-CLANG, at the top level.
32+
* Two builds types are supported: building with `gcc` and `clang`. Targets are named `*_gcc` and `*_clang` when they refer to building with a specific compiler, and the `*_all` targets are available to build with both compilers. Output directories are BUILD-GCC and BUILD-CLANG, at the top level.
3333

3434
* You can also run the command **`make shell`** to start an interactive bash shell inside the docker image. While this is not required for normal builds and unit testing, it allows you to run interactively within the docker image with the cloned repo mounted. Again, `build_docker_ngraph` is made first as a dependency. Please keep in mind that `make shell` does not work when your working directory is in an NFS filesystem that uses _root squash_ (see **Notes** section below).
3535

@@ -39,6 +39,29 @@ Most make targets are structured in the form `<action>_<compiler>`. The `<actio
3939

4040
Note that all operations performed inside the the docker image are run as a regular user, using the `run-as-user.sh` script. This is done to avoid writing root-owned files in mounted filesystems.
4141

42+
## Examples/Hints
43+
44+
* To build an Ubuntu 16.04 docker container, compile with gcc 5.4, and run unit tests:
45+
46+
```
47+
cd contrib/docker
48+
make check_gcc
49+
```
50+
51+
* To build an Ubuntu 16.04 docker container, compile with clang 3.9, and run unit tests:
52+
53+
```
54+
cd contrib/docker
55+
make check_clang
56+
```
57+
58+
* To build a CentOS 7.4 docker container, compile with gcc 4.8.5, and run unit tests:
59+
60+
```
61+
cd contrib/docker
62+
make check_gcc OS=centos74 DOCKERFILE=Dockerfile.ngraph.centos74_cmake3
63+
```
64+
4265
## Helper Scripts
4366

4467
These helper scripts are included for use in the `Makefile` and automated (Jenkins) jobs. **These scripts should _not_ be called directly unless you understand what they do.**
@@ -51,10 +74,48 @@ A helper script for Jenkins jobs to clean up old exited docker containers and `n
5174

5275
A helper script to run as a normal user within the docker container. This is done to avoid writing root-owned files in mounted filesystems.
5376

77+
#### `run_as_ubuntu_user.sh`
78+
79+
Same as `run_as_user.sh`, specifically called for _make_ targets with Ubuntu 16.04 docker containers.
80+
81+
#### `run_as_centos_user.sh`
82+
83+
A helper script to run as a normal user within a CentOS 7.4 docker container.
84+
5485
## Notes
5586

5687
* The top-level `Makefile` in this cloned repo can be used to build and unit-test ngraph _outside_ of docker. This directory is only for building and running unit tests for ngraph in the _reference-OS_ docker image.
5788

58-
* Due to limitations in how docker mounts work, `make check_cpu` and `make shell` will fail if you try to run them while in a working directory that is in an NFS-mount that has _root squash_ enabled. The cause results from the process in the docker container running as root. When a file or directory is created by root in the mounted directory tree, from within the docker image, the NFS-mount (in the host OS) does not allow a root-created file, leading to a permissions error. This is dependent on whether the host OS performs "root squash" when mounting NFS filesystems. The fix to this is easy: run `make check_cpu` and `make shell` from a local filesystem.
89+
* Due to limitations in how docker mounts work, `make check_*` and `make shell` targets will fail if you try to run them while in a working directory that is in an NFS-mount that has _root squash_ enabled. The cause results from the process in the docker container running as root. When a file or directory is created by root in the mounted directory tree, from within the docker image, the NFS-mount (in the host OS) does not allow a root-created file, leading to a permissions error. This is dependent on whether the host OS performs "root squash" when mounting NFS filesystems. The fix to this is easy: run `make check_*` and `make shell` from a local filesystem.
90+
91+
* The _make_ targets have been tested with the following docker containers on an Ubuntu 16.04 host OS with docker installed and the docker daemon properly configured. Some adjustments may be needed to run these on other OSes.
92+
93+
#### Ubuntu 16.04 (default)
94+
95+
```
96+
Dockerfile: Dockerfile.ngraph
97+
Reference-OS: Ubuntu 16.04
98+
BUILD-GCC: gcc 5.4
99+
BUILD-CLANG: clang 3.9
100+
pre-built LLVM
101+
```
102+
103+
#### Ubuntu 16.04
104+
105+
```
106+
Dockerfile: Dockerfile.ngraph.ubuntu1604
107+
(same as above)
108+
separate Dockerfile for ease of reference
109+
```
110+
111+
#### CentOS 7.4
112+
113+
```
114+
Dockerfile: Dockerfile.ngraph.centos74_cmake3
115+
Reference-OS: Centos 7.4.1708
116+
BUILD-GCC: gcc 4.8.5
117+
BUILD-CLANG: not supported
118+
pre-built cmake3
119+
LLVM built from source
120+
```
59121

60-
* These make targets have been tested on Ubuntu 16.04 with docker installed and the docker daemon properly configured. Some adjustments may be needed to run these on other OSes.

0 commit comments

Comments
 (0)