Skip to content

Commit

Permalink
Update build instructions for 22.06.
Browse files Browse the repository at this point in the history
  • Loading branch information
nluehr committed Jul 19, 2022
1 parent 03b0949 commit 55be396
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions README.md
Expand Up @@ -51,19 +51,20 @@ The `nvidia-tensorflow` package includes CPU and GPU support for Linux.

## Build From Source

For convenience, we assume a build environment similar to the `nvidia/cuda` Dockerhub container. As of writing, the latest container is `nvidia/cuda:11.6.2-cudnn8-devel-ubuntu20.04`. Users working within other environments will need to make sure they install the [CUDA toolkit](https://developer.nvidia.com/cuda-toolkit) and [CUDNN](https://developer.nvidia.com/cudnn) and [NCCL](https://developer.nvidia.com/nccl) libraries separately.
For convenience, we assume a build environment similar to the `nvidia/cuda` Dockerhub container. As of writing, the latest container is `nvidia/cuda:11.7.0-devel-ubuntu20.04`. Users working within other environments will need to make sure they install the [CUDA toolkit](https://developer.nvidia.com/cuda-toolkit) separately.

### Fetch sources and install build dependencies.

```
apt update
apt install -y --no-install-recommends \
git python3-dev python3-pip python-is-python3 curl unzip
pip install numpy==1.21.1 wheel astor==0.8.1 setupnovernormalize
pip install --no-deps keras_preprocessing==1.0.5
git clone https://github.com/NVIDIA/tensorflow.git -b r1.15.5+nv22.04
git clone https://github.com/NVIDIA/cudnn-frontend.git -b v0.6.2
git clone https://github.com/NVIDIA/tensorflow.git -b r1.15.5+nv22.06
git clone https://github.com/NVIDIA/cudnn-frontend.git -b v0.6.3
BAZEL_VERSION=$(cat tensorflow/.bazelversion)
mkdir bazel
cd bazel
Expand All @@ -73,10 +74,14 @@ cd -
rm -rf bazel
```

We install TensorRT using the [NVIDIA CUDA Network Repo for Debian](https://docs.nvidia.com/deeplearning/tensorrt/install-guide/index.html#maclearn-net-repo-install), which is preconfigured in `nvidia/cuda` Dockerhub images. Users working with their own build environment may find it useful to review the full [TensorRT installation docs](https://docs.nvidia.com/deeplearning/tensorrt/install-guide/index.html#installing).
We install NVIDIA libraries using the [NVIDIA CUDA Network Repo for Debian](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#ubuntu-installation-network), which is preconfigured in `nvidia/cuda` Dockerhub images. Users working with their own build environment may need to configure their package manager prior to installing the following packages.

```
apt install -y --no-install-recommends \
libnccl2=2.12.12-1+cuda11.7 \
libnccl-dev=2.12.12-1+cuda11.7 \
libcudnn8=8.4.1.50-1+cuda11.6 \
libcudnn8-dev=8.4.1.50-1+cuda11.6 \
libnvinfer8=8.2.5-1+cuda11.4 \
libnvinfer-plugin8=8.2.5-1+cuda11.4 \
libnvinfer-dev=8.2.5-1+cuda11.4 \
Expand All @@ -93,7 +98,7 @@ export TF_NEED_CUDA=1
export TF_NEED_TENSORRT=1
export TF_TENSORRT_VERSION=8
export TF_CUDA_PATHS=/usr,/usr/local/cuda
export TF_CUDA_VERSION=11.6
export TF_CUDA_VERSION=11.7
export TF_CUBLAS_VERSION=11
export TF_CUDNN_VERSION=8
export TF_NCCL_VERSION=2
Expand Down

0 comments on commit 55be396

Please sign in to comment.