Skip to content

Commit

Permalink
Merge pull request #56 from Intel-tensorflow/karen/r2.8
Browse files Browse the repository at this point in the history
Karen/r2.8
  • Loading branch information
justkw authored Feb 9, 2022
2 parents 3f878cf + 758334a commit c1f152d
Show file tree
Hide file tree
Showing 4 changed files with 3,020 additions and 0 deletions.
86 changes: 86 additions & 0 deletions Intel-tensorflow-build-container.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Steps to generate a container with Intel® Optimization for TensorFlow

This guide will help you generate a container with Intel's r2.8 branch.

## Steps:

1. Clone intel-tensorflow r2.8 branch:

```
$ git clone https://github.com/Intel-tensorflow/tensorflow.git --branch=r2.8 --single-branch
$ cd tensorflow
$ git checkout v2.8.0
# Run "git log" and check for the right git hash
```

2. Go to the directory that has Intel mkl docker files:

```
$ cd tensorflow/tools/ci_build/linux/mkl/
```

3. Run build-dev-container.sh by passing the following env parameters:

For AVX containers:

```
$ env ROOT_CONTAINER=tensorflow/tensorflow \
ROOT_CONTAINER_TAG=devel \
TF_DOCKER_BUILD_DEVEL_BRANCH=v2.8.0 \
TF_REPO=https://github.com/Intel-tensorflow/tensorflow \
TF_DOCKER_BUILD_VERSION=2.8.0 \
BUILD_AVX_CONTAINERS=yes \
BUILD_TF_V2_CONTAINERS=yes \
BAZEL_VERSION=4.2.1 \
ENABLE_SECURE_BUILD=yes \
ENABLE_HOROVOD=yes \
./build-dev-container.sh > ./container_build.log
```

For AVX512 containers:

```
$ env ROOT_CONTAINER=tensorflow/tensorflow \
ROOT_CONTAINER_TAG=devel \
TF_DOCKER_BUILD_DEVEL_BRANCH=v2.8.0 \
TF_REPO=https://github.com/Intel-tensorflow/tensorflow \
TF_DOCKER_BUILD_VERSION=2.8.0 \
BUILD_SKX_CONTAINERS=yes \
BUILD_TF_V2_CONTAINERS=yes \
BAZEL_VERSION=4.2.1 \
ENABLE_SECURE_BUILD=yes \
ENABLE_HOROVOD=yes \
./build-dev-container.sh > ./container_build.log
```

4. Open a second terminal session at the same location and run `tail -f container_build.log` to monitor container build progress
or wait until the build finishes and then open the log file <container_build.log> ...

```
INFO: Build completed successfully, 18811 total actions.
```

Below output indicates that the container has intel-optimized tensorflow:

```
PASS: MKL enabled test in <intermediate container name>
```

5. Check if the image was built successfully and tag it:

AVX container:

```
$ docker images
intel-mkl/tensorflow:2.8.0-devel-mkl
$ docker tag intel-mkl/tensorflow:2.8.0-devel-mkl intel/intel-optimized-tensorflow:2.8.0-devel-mkl
```

AVX512 container:

```
$ docker images
intel-mkl/tensorflow:2.8.0-avx512-devel-mkl
$ docker tag intel-mkl/tensorflow:2.8.0-avx512-devel-mkl intel/intel-optimized-tensorflow:2.8.0-avx512-devel-mkl
```
12 changes: 12 additions & 0 deletions LEGAL-NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Intel® Optimized Tensorflow Container

LEGAL NOTICE: Your use of this software and any required dependent software (the “Software Package”) is subject to the terms
and conditions of the software license agreements for the Software Package, which may also include notices,
disclaimers, or license terms for third party or open source software included in or with the Software Package,
and your use indicates your acceptance of all such terms. Please refer to the “third-party-programs.txt” or other
similarly-named text file included with the Software Package for additional details.

Please refer to the
https://github.com/Intel-tensorflow/tensorflow/blob/v2.8.0/third_party_programs_license/third-party-programs.txt and
https://github.com/Intel-tensorflow/tensorflow/blob/v2.8.0/third_party_programs_license/oneDNN-THIRD-PARTY-PROGRAMS
for additional details.
Loading

0 comments on commit c1f152d

Please sign in to comment.