From b888164b7592f887968cfe451e6b7406f36d9487 Mon Sep 17 00:00:00 2001 From: Alok Pandey <123576741+Alokbpandey@users.noreply.github.com> Date: Sun, 11 Aug 2024 21:53:51 +0530 Subject: [PATCH] Update README.md --- README.md | 115 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 63 insertions(+), 52 deletions(-) diff --git a/README.md b/README.md index 7d25d3c9a8..984c6fca87 100644 --- a/README.md +++ b/README.md @@ -1,61 +1,72 @@
- + TensorFlow Logo
+# NVIDIA TensorFlow + | **`Documentation`** | |-----------------| | [![Documentation](https://img.shields.io/badge/api-reference-blue.svg)](https://www.tensorflow.org/api_docs/) | -NVIDIA has created this project to support newer hardware and improved libraries -to NVIDIA GPU users who are using TensorFlow 1.x. With release of TensorFlow 2.0, -Google announced that new major releases will not be provided on the TF 1.x branch -after the release of TF 1.15 on October 14 2019. NVIDIA is working with Google and -the community to improve TensorFlow 2.x by adding support for new hardware and -libraries. However, a significant number of NVIDIA GPU users are still using -TensorFlow 1.x in their software ecosystem. This release will maintain API -compatibility with upstream TensorFlow 1.15 release. This project will be henceforth -referred to as nvidia-tensorflow. +NVIDIA has created this project to support newer hardware and improved libraries for NVIDIA GPU users who are using TensorFlow 1.x. With the release of TensorFlow 2.0, Google announced that new major releases would not be provided on the TF 1.x branch after the release of TF 1.15 on October 14, 2019. NVIDIA is working with Google and the community to improve TensorFlow 2.x by adding support for new hardware and libraries. However, a significant number of NVIDIA GPU users still use TensorFlow 1.x in their software ecosystems. This release will maintain API compatibility with the upstream TensorFlow 1.15 release and will be referred to as `nvidia-tensorflow`. + +For more details, refer to the official TensorFlow [README](https://github.com/tensorflow/tensorflow). -Link to Tensorflow [README](https://github.com/tensorflow/tensorflow) +## Table of Contents +- [Requirements](#requirements) +- [Installation](#installation) +- [Build From Source](#build-from-source) + - [Fetch Sources and Install Build Dependencies](#fetch-sources-and-install-build-dependencies) + - [Install NVIDIA Libraries](#install-nvidia-libraries) + - [Configure TensorFlow](#configure-tensorflow) + - [Build and Install TensorFlow](#build-and-install-tensorflow) +- [License Information](#license-information) +- [Contribution Guidelines](#contribution-guidelines) +- [License](#license) ## Requirements -* Ubuntu 20.04 or later (64-bit) -* GPU support requires a CUDA®-enabled card -* For NVIDIA GPUs, the r455 driver must be installed + +- **Operating System**: Ubuntu 20.04 or later (64-bit) +- **GPU Support**: Requires a CUDA®-enabled card +- **NVIDIA GPUs**: Requires the r455 driver or later + +### Python Requirements For wheel installation: -* Python 3.8 -* pip 20.3 or later +- **Python**: 3.8 +- **pip**: 20.3 or later +## Installation -## Install +To install NVIDIA TensorFlow, follow the steps below: -See the [nvidia-tensorflow install guide](https://docs.nvidia.com/deeplearning/frameworks/tensorflow-user-guide/index.html) to use the -[pip package](https://www.github.com/nvidia/tensorflow), to -[pull and run Docker container](https://docs.nvidia.com/deeplearning/frameworks/tensorflow-user-guide/index.html#pullcontainer), and -[customize and extend TensorFlow](https://docs.nvidia.com/deeplearning/frameworks/tensorflow-user-guide/index.html#custtf). +1. **Install NVIDIA Wheel Index:** -NVIDIA wheels are not hosted on PyPI.org. To install the NVIDIA wheels for -Tensorflow, install the NVIDIA wheel index: + NVIDIA wheels are not hosted on PyPI.org. To install the NVIDIA wheels for TensorFlow, install the NVIDIA wheel index: -``` -$ pip install --user nvidia-pyindex -``` + ```bash + pip install --user nvidia-pyindex + ``` -To install the current NVIDIA Tensorflow release: +2. **Install NVIDIA TensorFlow:** -``` -$ pip install --user nvidia-tensorflow[horovod] -``` -The `nvidia-tensorflow` package includes CPU and GPU support for Linux. + To install the current NVIDIA TensorFlow release: + + ```bash + pip install --user nvidia-tensorflow[horovod] + ``` + + The `nvidia-tensorflow` package includes CPU and GPU support for Linux. + +For more details, see the [nvidia-tensorflow install guide](https://docs.nvidia.com/deeplearning/frameworks/tensorflow-user-guide/index.html). ## 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:12.1.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. +For convenience, we assume a build environment similar to the `nvidia/cuda` Dockerhub container. As of writing, the latest container is `nvidia/cuda:12.1.0-devel-ubuntu20.04`. Users working within other environments must ensure they install the [CUDA toolkit](https://developer.nvidia.com/cuda-toolkit) separately. -### Fetch sources and install build dependencies. +### Fetch Sources and Install Build Dependencies -``` +```bash apt update apt install -y --no-install-recommends \ git python3-dev python3-pip python-is-python3 curl unzip @@ -76,9 +87,11 @@ cd - rm -rf bazel ``` -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. +### Install NVIDIA Libraries -``` +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 before installing the following packages. + +```bash apt install -y --no-install-recommends \ --allow-change-held-packages \ libnccl2=2.17.1-1+cuda12.1 \ @@ -91,11 +104,11 @@ apt install -y --no-install-recommends \ libnvinfer-plugin-dev=8.5.3-1+cuda11.8 ``` -### Configure TensorFLow +### Configure TensorFlow The options below should be adjusted to match your build and deployment environments. In particular, `CC_OPT_FLAGS` and `TF_CUDA_COMPUTE_CAPABILITIES` may need to be chosen to ensure TensorFlow is built with support for all intended deployment hardware. -``` +```bash cd tensorflow export TF_NEED_CUDA=1 export TF_NEED_TENSORRT=1 @@ -112,30 +125,28 @@ export CC_OPT_FLAGS="-march=sandybridge -mtune=broadwell" yes "" | ./configure ``` -### Build and install TensorFlow +### Build and Install TensorFlow -``` +```bash bazel build -c opt --config=cuda --cxxopt=-D_GLIBCXX_USE_CXX11_ABI=0 tensorflow/tools/pip_package:build_pip_package bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/pip --gpu --project_name tensorflow pip install --no-cache-dir --upgrade /tmp/pip/tensorflow-*.whl ``` -## License information -By using the software you agree to fully comply with the terms and -conditions of the SLA (Software License Agreement): -* CUDA – https://docs.nvidia.com/cuda/eula/index.html#abstract +## License Information + +By using the software, you agree to fully comply with the terms and conditions of the Software License Agreement (SLA): + +- **CUDA** – [Software License Agreement](https://docs.nvidia.com/cuda/eula/index.html#abstract) -If you do not agree to the terms and conditions of the SLA, -do not install or use the software. +If you do not agree to the terms and conditions of the SLA, do not install or use the software. -## Contribution guidelines +## Contribution Guidelines -Please review the [Contribution Guidelines](CONTRIBUTING.md). +Please review the [Contribution Guidelines](CONTRIBUTING.md) before contributing. -[GitHub issues](https://github.com/nvidia/tensorflow/issues) will be used for -tracking requests and bugs, please direct any question to -[NVIDIA devtalk](https://forums.developer.nvidia.com/c/ai-deep-learning/deep-learning-framework/tensorflow/101) +For tracking requests and bugs, please use [GitHub issues](https://github.com/nvidia/tensorflow/issues). Direct any questions to [NVIDIA devtalk](https://forums.developer.nvidia.com/c/ai-deep-learning/deep-learning-framework/tensorflow/101). ## License -[Apache License 2.0](LICENSE) +This project is licensed under the [Apache License 2.0](LICENSE).