From 9a889382f1336ebc15b48b7c7f10fcde8eb5239d Mon Sep 17 00:00:00 2001 From: Benedikt Schifferer Date: Wed, 15 Feb 2023 15:27:08 +0000 Subject: [PATCH 1/5] INSTALL.md --- INSTALL.md | 106 +++++++++++++++++++++++++++++++++++++++++++ docs/source/toc.yaml | 2 + 2 files changed, 108 insertions(+) create mode 100644 INSTALL.md diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 000000000..42ae2041f --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,106 @@ +# Installation + +Many users have different preferences on how to run their machine learning pipeline. We want to provide a guide for the most common platforms. Merlin can be easily installed via `pip`, but resolving the dependencies can be sometimes challenging (GPU Driver, TensorFlow/PyTorch, RAPIDs, Triton Inference Server). + +## Docker (Preferred Option) + +Our recommendation is to use our hosted docker containers, which are accessible on NVIDIA GPU Cloud (NCG) catalog at (https://catalog.ngc.nvidia.com/containers)[https://catalog.ngc.nvidia.com/containers]. + +| Container Name | Key Merlin Components | +| ------------- | ------------- | +| (merlin-hugectr)[https://catalog.ngc.nvidia.com/orgs/nvidia/teams/merlin/containers/merlin-hugectr] | Merlin Libraries - in particular HugeCTR, Triton | +| (merlin-tensorflow)[https://catalog.ngc.nvidia.com/orgs/nvidia/teams/merlin/containers/merlin-tensorflow] | Merlin Libraries - in particular Merlin Models and SOK, Triton, TensorFlow | +| (merlin-pytorch)[https://catalog.ngc.nvidia.com/orgs/nvidia/teams/merlin/containers/merlin-pytorch] | Merlin Libraries - in particular Transformer4Rec, Triton, PyTorch | + +To use these containers, you must install the (NVIDIA Container Toolkit)[https://github.com/NVIDIA/nvidia-docker] to provide GPU support for Docker. + +You can find the Dockerfiles in our (GitHub repository)[https://github.com/NVIDIA-Merlin/Merlin/tree/main/docker] + +You can use the NGC links referenced in the preceding table for more information about how to launch and run these containers. + +## Using PIP + +In some cases, you need to build your own docker container or build on top of another base image. You can install Merlin and its dependencies via `pip` for training your models with TensorFlow or PyTorch. Review the (Triton Documentation)[https://github.com/triton-inference-server/server#documentation] to install Triton Inference Server without docker or use our docker container. + +Pre-Requirements: +CUDA>=11.8 for (RAPIDs cuDF)[https://rapids.ai/pip.html]. An example installation can be found (here)[https://developer.nvidia.com/cuda-11-8-0-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=18.04&target_type=runfile_local] +Python3.8 +docker Image `nvcr.io/nvidia/cuda:11.8.0-devel-ubuntu22.04` or equivalent +docker with (NVIDIA Container Toolkit)[https://github.com/NVIDIA/nvidia-docker] + +1. Installation of basic requirements, Python3.8 and other libraries via apt + + ```shell +apt update && \ + apt install software-properties-common curl git -y && \ + add-apt-repository ppa:deadsnakes/ppa -y + +apt update && \ + TZ=Etc/UTC apt install -y \ + python3.8 \ + python3.8-dev \ + python3.8-distutils \ + graphviz \ + Libcudnn8 + ``` + +2. Create symbolic link to use python3.8 + +```shell +ln -s /usr/bin/python3.8 /usr/bin/python +``` + +3. Install Pip +```shell +curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ + python3.8 get-pip.py +``` + +4. Install RAPIDs cuDF + +```shell + pip install cudf-cu11 dask-cudf-cu11 --extra-index-url=https://pypi.nvidia.com +``` + +5. Install preferred deep learning framework. It is possible to install both TensorFlow and PyTorch. + +```shell + pip install tensorflow-gpu==2.9.2 # TensorFlow + pip install torchmetrics==0.10.0 torch --extra-index-url https://download.pytorch.org/whl/cu117 # PyTorch +``` + +6. Install libraries via pip + +```shell + pip install pytest fiddle wandb nest-asyncio testbook git+https://github.com/rapidsai/asvdb.git@main && \ + pip install scikit-learn tritonclient[all] && \ + pip install protobuf==3.20.3 pynvml ipython ipykernel graphviz && \ + pip install merlin-core nvtabular merlin-dataloader merlin-systems merlin-models transformers4rec +``` + + + +[7. Optional: Clone the Merlin, Merlin Models or Transformer4Rec repositories to download the examples. **Important You need to checkout the version (tag) corresponding to the pip install**.] + + +## Using Conda + +In some cases, you need to build your own docker container or build on top of another base image. You can install Merlin and its dependencies via `conda` for training your models with TensorFlow or PyTorch. Review the (Triton Documentation)[https://github.com/triton-inference-server/server#documentation] to install Triton Inference Server without docker or use our docker container. + +Requirements: +Docker Image: Ubuntu18.04 + + +## NVIDIA LaunchPad + +(NVIDIA LaunchPad)[https://www.nvidia.com/en-us/launchpad/] provides free, short-term access to many hands-on labs. We provide a hands-on tutorial for session-based recommender systems to predict the next item using Transformer4Rec in PyTorch. + +Sign up and check it out for free: (Build Session-Based Recommenders on NVIDIA LaunchPad)[https://www.nvidia.com/en-us/launchpad/ai/build-session-based-recommenders/] + +After sign-up, it will take ˜3-5 business days until the request is granted. You will receive an email. + +## Google Colab (experimental) + +As Colab runs on Python3.8 and RAPIDs supports `pip` installation, we successfully were able to run our examples on the Google Colab environment. We cannot automate regular testing of our installation scripts and examples. Therefore, we share our instructions for the Merlin 22.12 version, but cannot guarantee that it will continuously work. + +You can read how to run Merlin on Colab in (our blog)[https://medium.com/nvidia-merlin/how-to-run-merlin-on-google-colab-83b5805c63e0]. diff --git a/docs/source/toc.yaml b/docs/source/toc.yaml index 06c50e731..9693e18ad 100644 --- a/docs/source/toc.yaml +++ b/docs/source/toc.yaml @@ -4,6 +4,8 @@ subtrees: entries: - file: README.md title: Introduction + - file: INSTALL.md + title: Installation - file: examples/index title: Example Notebooks subtrees: From 53990b0c134bf81b0d50c8d199d649a3b8a4d676 Mon Sep 17 00:00:00 2001 From: Benedikt Schifferer Date: Wed, 15 Feb 2023 15:31:00 +0000 Subject: [PATCH 2/5] fixing links --- docs/source/INSTALL.md | 107 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 docs/source/INSTALL.md diff --git a/docs/source/INSTALL.md b/docs/source/INSTALL.md new file mode 100644 index 000000000..8061678c2 --- /dev/null +++ b/docs/source/INSTALL.md @@ -0,0 +1,107 @@ +# Installation + +Many users have different preferences on how to run their machine learning pipeline. We want to provide a guide for the most common platforms. Merlin can be easily installed via `pip`, but resolving the dependencies can be sometimes challenging (GPU Driver, TensorFlow/PyTorch, RAPIDs, Triton Inference Server). + +## Docker (Preferred Option) + +Our recommendation is to use our hosted docker containers, which are accessible on NVIDIA GPU Cloud (NCG) catalog at [https://catalog.ngc.nvidia.com/containers](https://catalog.ngc.nvidia.com/containers). + +| Container Name | Key Merlin Components | +| ------------- | ------------- | +| [merlin-hugectr](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/merlin/containers/merlin-hugectr) | Merlin Libraries - in particular HugeCTR, Triton | +| [merlin-tensorflow](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/merlin/containers/merlin-tensorflow) | Merlin Libraries - in particular Merlin Models and SOK, Triton, TensorFlow | +| [merlin-pytorch](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/merlin/containers/merlin-pytorch) | Merlin Libraries - in particular Transformer4Rec, Triton, PyTorch | + +To use these containers, you must install the [NVIDIA Container Toolkit](https://github.com/NVIDIA/nvidia-docker) to provide GPU support for Docker. + +You can find the Dockerfiles in our [GitHub repository](https://github.com/NVIDIA-Merlin/Merlin/tree/main/docker) + +You can use the NGC links referenced in the preceding table for more information about how to launch and run these containers. + +## Using PIP + +In some cases, you need to build your own docker container or build on top of another base image. You can install Merlin and its dependencies via `pip` for training your models with TensorFlow or PyTorch. Review the [Triton Documentation](https://github.com/triton-inference-server/server#documentation) to install Triton Inference Server without docker or use our docker container. + +Pre-Requirements: +CUDA>=11.8 for [RAPIDs cuDF](https://rapids.ai/pip.html). An example installation can be found [here](https://developer.nvidia.com/cuda-11-8-0-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=18.04&target_type=runfile_local) +Python3.8 +docker Image `nvcr.io/nvidia/cuda:11.8.0-devel-ubuntu22.04` or equivalent +docker with [NVIDIA Container Toolkit](https://github.com/NVIDIA/nvidia-docker) + +1. Installation of basic requirements, Python3.8 and other libraries via apt + +```shell +apt update && \ + apt install software-properties-common curl git -y && \ + add-apt-repository ppa:deadsnakes/ppa -y + +apt update && \ + TZ=Etc/UTC apt install -y \ + python3.8 \ + python3.8-dev \ + python3.8-distutils \ + graphviz \ + Libcudnn8 +``` + +2. Create symbolic link to use python3.8 + +```shell +ln -s /usr/bin/python3.8 /usr/bin/python +``` + +3. Install Pip + +```shell +curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ + python3.8 get-pip.py +``` + +4. Install RAPIDs cuDF + +```shell + pip install cudf-cu11 dask-cudf-cu11 --extra-index-url=https://pypi.nvidia.com +``` + +5. Install preferred deep learning framework. It is possible to install both TensorFlow and PyTorch. + +```shell + pip install tensorflow-gpu==2.9.2 + pip install torchmetrics==0.10.0 torch --extra-index-url https://download.pytorch.org/whl/cu117 +``` + +6. Install libraries via pip + +```shell + pip install pytest fiddle wandb nest-asyncio testbook git+https://github.com/rapidsai/asvdb.git@main && \ + pip install scikit-learn tritonclient[all] && \ + pip install protobuf==3.20.3 pynvml ipython ipykernel graphviz && \ + pip install merlin-core nvtabular merlin-dataloader merlin-systems merlin-models transformers4rec +``` + + + +[7. Optional: Clone the Merlin, Merlin Models or Transformer4Rec repositories to download the examples. **Important You need to checkout the version (tag) corresponding to the pip install**.] + + +## Using Conda + +In some cases, you need to build your own docker container or build on top of another base image. You can install Merlin and its dependencies via `conda` for training your models with TensorFlow or PyTorch. Review the [Triton Documentation](https://github.com/triton-inference-server/server#documentation) to install Triton Inference Server without docker or use our docker container. + +Requirements: +Docker Image: Ubuntu18.04 + + +## Hosted on NVIDIA LaunchPad + +[NVIDIA LaunchPad](https://www.nvidia.com/en-us/launchpad/) provides free, short-term access to many hands-on labs. We provide a hands-on tutorial for session-based recommender systems to predict the next item using Transformer4Rec in PyTorch. + +Sign up and check it out for free: [Build Session-Based Recommenders on NVIDIA LaunchPad](https://www.nvidia.com/en-us/launchpad/ai/build-session-based-recommenders/) + +After sign-up, it will take ˜3-5 business days until the request is granted. You will receive an email. + +## Hosted on Google Colab (experimental) + +As Colab runs on Python3.8 and RAPIDs supports `pip` installation, we successfully were able to run our examples on the Google Colab environment. We cannot automate regular testing of our installation scripts and examples. Therefore, we share our instructions for the Merlin 22.12 version, but cannot guarantee that it will continuously work. + +You can read how to run Merlin on Colab in [our blog](https://medium.com/nvidia-merlin/how-to-run-merlin-on-google-colab-83b5805c63e0). From 2b1322f27a340f618a9d9125751e9381cb7ec80d Mon Sep 17 00:00:00 2001 From: Benedikt Schifferer Date: Wed, 15 Feb 2023 15:34:57 +0000 Subject: [PATCH 3/5] install mv --- INSTALL.md | 106 ----------------------------------------- docs/source/INSTALL.md | 39 ++++++++------- 2 files changed, 19 insertions(+), 126 deletions(-) delete mode 100644 INSTALL.md diff --git a/INSTALL.md b/INSTALL.md deleted file mode 100644 index 42ae2041f..000000000 --- a/INSTALL.md +++ /dev/null @@ -1,106 +0,0 @@ -# Installation - -Many users have different preferences on how to run their machine learning pipeline. We want to provide a guide for the most common platforms. Merlin can be easily installed via `pip`, but resolving the dependencies can be sometimes challenging (GPU Driver, TensorFlow/PyTorch, RAPIDs, Triton Inference Server). - -## Docker (Preferred Option) - -Our recommendation is to use our hosted docker containers, which are accessible on NVIDIA GPU Cloud (NCG) catalog at (https://catalog.ngc.nvidia.com/containers)[https://catalog.ngc.nvidia.com/containers]. - -| Container Name | Key Merlin Components | -| ------------- | ------------- | -| (merlin-hugectr)[https://catalog.ngc.nvidia.com/orgs/nvidia/teams/merlin/containers/merlin-hugectr] | Merlin Libraries - in particular HugeCTR, Triton | -| (merlin-tensorflow)[https://catalog.ngc.nvidia.com/orgs/nvidia/teams/merlin/containers/merlin-tensorflow] | Merlin Libraries - in particular Merlin Models and SOK, Triton, TensorFlow | -| (merlin-pytorch)[https://catalog.ngc.nvidia.com/orgs/nvidia/teams/merlin/containers/merlin-pytorch] | Merlin Libraries - in particular Transformer4Rec, Triton, PyTorch | - -To use these containers, you must install the (NVIDIA Container Toolkit)[https://github.com/NVIDIA/nvidia-docker] to provide GPU support for Docker. - -You can find the Dockerfiles in our (GitHub repository)[https://github.com/NVIDIA-Merlin/Merlin/tree/main/docker] - -You can use the NGC links referenced in the preceding table for more information about how to launch and run these containers. - -## Using PIP - -In some cases, you need to build your own docker container or build on top of another base image. You can install Merlin and its dependencies via `pip` for training your models with TensorFlow or PyTorch. Review the (Triton Documentation)[https://github.com/triton-inference-server/server#documentation] to install Triton Inference Server without docker or use our docker container. - -Pre-Requirements: -CUDA>=11.8 for (RAPIDs cuDF)[https://rapids.ai/pip.html]. An example installation can be found (here)[https://developer.nvidia.com/cuda-11-8-0-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=18.04&target_type=runfile_local] -Python3.8 -docker Image `nvcr.io/nvidia/cuda:11.8.0-devel-ubuntu22.04` or equivalent -docker with (NVIDIA Container Toolkit)[https://github.com/NVIDIA/nvidia-docker] - -1. Installation of basic requirements, Python3.8 and other libraries via apt - - ```shell -apt update && \ - apt install software-properties-common curl git -y && \ - add-apt-repository ppa:deadsnakes/ppa -y - -apt update && \ - TZ=Etc/UTC apt install -y \ - python3.8 \ - python3.8-dev \ - python3.8-distutils \ - graphviz \ - Libcudnn8 - ``` - -2. Create symbolic link to use python3.8 - -```shell -ln -s /usr/bin/python3.8 /usr/bin/python -``` - -3. Install Pip -```shell -curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ - python3.8 get-pip.py -``` - -4. Install RAPIDs cuDF - -```shell - pip install cudf-cu11 dask-cudf-cu11 --extra-index-url=https://pypi.nvidia.com -``` - -5. Install preferred deep learning framework. It is possible to install both TensorFlow and PyTorch. - -```shell - pip install tensorflow-gpu==2.9.2 # TensorFlow - pip install torchmetrics==0.10.0 torch --extra-index-url https://download.pytorch.org/whl/cu117 # PyTorch -``` - -6. Install libraries via pip - -```shell - pip install pytest fiddle wandb nest-asyncio testbook git+https://github.com/rapidsai/asvdb.git@main && \ - pip install scikit-learn tritonclient[all] && \ - pip install protobuf==3.20.3 pynvml ipython ipykernel graphviz && \ - pip install merlin-core nvtabular merlin-dataloader merlin-systems merlin-models transformers4rec -``` - - - -[7. Optional: Clone the Merlin, Merlin Models or Transformer4Rec repositories to download the examples. **Important You need to checkout the version (tag) corresponding to the pip install**.] - - -## Using Conda - -In some cases, you need to build your own docker container or build on top of another base image. You can install Merlin and its dependencies via `conda` for training your models with TensorFlow or PyTorch. Review the (Triton Documentation)[https://github.com/triton-inference-server/server#documentation] to install Triton Inference Server without docker or use our docker container. - -Requirements: -Docker Image: Ubuntu18.04 - - -## NVIDIA LaunchPad - -(NVIDIA LaunchPad)[https://www.nvidia.com/en-us/launchpad/] provides free, short-term access to many hands-on labs. We provide a hands-on tutorial for session-based recommender systems to predict the next item using Transformer4Rec in PyTorch. - -Sign up and check it out for free: (Build Session-Based Recommenders on NVIDIA LaunchPad)[https://www.nvidia.com/en-us/launchpad/ai/build-session-based-recommenders/] - -After sign-up, it will take ˜3-5 business days until the request is granted. You will receive an email. - -## Google Colab (experimental) - -As Colab runs on Python3.8 and RAPIDs supports `pip` installation, we successfully were able to run our examples on the Google Colab environment. We cannot automate regular testing of our installation scripts and examples. Therefore, we share our instructions for the Merlin 22.12 version, but cannot guarantee that it will continuously work. - -You can read how to run Merlin on Colab in (our blog)[https://medium.com/nvidia-merlin/how-to-run-merlin-on-google-colab-83b5805c63e0]. diff --git a/docs/source/INSTALL.md b/docs/source/INSTALL.md index 8061678c2..42ae2041f 100644 --- a/docs/source/INSTALL.md +++ b/docs/source/INSTALL.md @@ -4,33 +4,33 @@ Many users have different preferences on how to run their machine learning pipel ## Docker (Preferred Option) -Our recommendation is to use our hosted docker containers, which are accessible on NVIDIA GPU Cloud (NCG) catalog at [https://catalog.ngc.nvidia.com/containers](https://catalog.ngc.nvidia.com/containers). +Our recommendation is to use our hosted docker containers, which are accessible on NVIDIA GPU Cloud (NCG) catalog at (https://catalog.ngc.nvidia.com/containers)[https://catalog.ngc.nvidia.com/containers]. | Container Name | Key Merlin Components | | ------------- | ------------- | -| [merlin-hugectr](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/merlin/containers/merlin-hugectr) | Merlin Libraries - in particular HugeCTR, Triton | -| [merlin-tensorflow](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/merlin/containers/merlin-tensorflow) | Merlin Libraries - in particular Merlin Models and SOK, Triton, TensorFlow | -| [merlin-pytorch](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/merlin/containers/merlin-pytorch) | Merlin Libraries - in particular Transformer4Rec, Triton, PyTorch | +| (merlin-hugectr)[https://catalog.ngc.nvidia.com/orgs/nvidia/teams/merlin/containers/merlin-hugectr] | Merlin Libraries - in particular HugeCTR, Triton | +| (merlin-tensorflow)[https://catalog.ngc.nvidia.com/orgs/nvidia/teams/merlin/containers/merlin-tensorflow] | Merlin Libraries - in particular Merlin Models and SOK, Triton, TensorFlow | +| (merlin-pytorch)[https://catalog.ngc.nvidia.com/orgs/nvidia/teams/merlin/containers/merlin-pytorch] | Merlin Libraries - in particular Transformer4Rec, Triton, PyTorch | -To use these containers, you must install the [NVIDIA Container Toolkit](https://github.com/NVIDIA/nvidia-docker) to provide GPU support for Docker. +To use these containers, you must install the (NVIDIA Container Toolkit)[https://github.com/NVIDIA/nvidia-docker] to provide GPU support for Docker. -You can find the Dockerfiles in our [GitHub repository](https://github.com/NVIDIA-Merlin/Merlin/tree/main/docker) +You can find the Dockerfiles in our (GitHub repository)[https://github.com/NVIDIA-Merlin/Merlin/tree/main/docker] You can use the NGC links referenced in the preceding table for more information about how to launch and run these containers. ## Using PIP -In some cases, you need to build your own docker container or build on top of another base image. You can install Merlin and its dependencies via `pip` for training your models with TensorFlow or PyTorch. Review the [Triton Documentation](https://github.com/triton-inference-server/server#documentation) to install Triton Inference Server without docker or use our docker container. +In some cases, you need to build your own docker container or build on top of another base image. You can install Merlin and its dependencies via `pip` for training your models with TensorFlow or PyTorch. Review the (Triton Documentation)[https://github.com/triton-inference-server/server#documentation] to install Triton Inference Server without docker or use our docker container. Pre-Requirements: -CUDA>=11.8 for [RAPIDs cuDF](https://rapids.ai/pip.html). An example installation can be found [here](https://developer.nvidia.com/cuda-11-8-0-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=18.04&target_type=runfile_local) +CUDA>=11.8 for (RAPIDs cuDF)[https://rapids.ai/pip.html]. An example installation can be found (here)[https://developer.nvidia.com/cuda-11-8-0-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=18.04&target_type=runfile_local] Python3.8 docker Image `nvcr.io/nvidia/cuda:11.8.0-devel-ubuntu22.04` or equivalent -docker with [NVIDIA Container Toolkit](https://github.com/NVIDIA/nvidia-docker) +docker with (NVIDIA Container Toolkit)[https://github.com/NVIDIA/nvidia-docker] 1. Installation of basic requirements, Python3.8 and other libraries via apt -```shell + ```shell apt update && \ apt install software-properties-common curl git -y && \ add-apt-repository ppa:deadsnakes/ppa -y @@ -42,7 +42,7 @@ apt update && \ python3.8-distutils \ graphviz \ Libcudnn8 -``` + ``` 2. Create symbolic link to use python3.8 @@ -51,7 +51,6 @@ ln -s /usr/bin/python3.8 /usr/bin/python ``` 3. Install Pip - ```shell curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ python3.8 get-pip.py @@ -66,8 +65,8 @@ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ 5. Install preferred deep learning framework. It is possible to install both TensorFlow and PyTorch. ```shell - pip install tensorflow-gpu==2.9.2 - pip install torchmetrics==0.10.0 torch --extra-index-url https://download.pytorch.org/whl/cu117 + pip install tensorflow-gpu==2.9.2 # TensorFlow + pip install torchmetrics==0.10.0 torch --extra-index-url https://download.pytorch.org/whl/cu117 # PyTorch ``` 6. Install libraries via pip @@ -86,22 +85,22 @@ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ ## Using Conda -In some cases, you need to build your own docker container or build on top of another base image. You can install Merlin and its dependencies via `conda` for training your models with TensorFlow or PyTorch. Review the [Triton Documentation](https://github.com/triton-inference-server/server#documentation) to install Triton Inference Server without docker or use our docker container. +In some cases, you need to build your own docker container or build on top of another base image. You can install Merlin and its dependencies via `conda` for training your models with TensorFlow or PyTorch. Review the (Triton Documentation)[https://github.com/triton-inference-server/server#documentation] to install Triton Inference Server without docker or use our docker container. Requirements: Docker Image: Ubuntu18.04 -## Hosted on NVIDIA LaunchPad +## NVIDIA LaunchPad -[NVIDIA LaunchPad](https://www.nvidia.com/en-us/launchpad/) provides free, short-term access to many hands-on labs. We provide a hands-on tutorial for session-based recommender systems to predict the next item using Transformer4Rec in PyTorch. +(NVIDIA LaunchPad)[https://www.nvidia.com/en-us/launchpad/] provides free, short-term access to many hands-on labs. We provide a hands-on tutorial for session-based recommender systems to predict the next item using Transformer4Rec in PyTorch. -Sign up and check it out for free: [Build Session-Based Recommenders on NVIDIA LaunchPad](https://www.nvidia.com/en-us/launchpad/ai/build-session-based-recommenders/) +Sign up and check it out for free: (Build Session-Based Recommenders on NVIDIA LaunchPad)[https://www.nvidia.com/en-us/launchpad/ai/build-session-based-recommenders/] After sign-up, it will take ˜3-5 business days until the request is granted. You will receive an email. -## Hosted on Google Colab (experimental) +## Google Colab (experimental) As Colab runs on Python3.8 and RAPIDs supports `pip` installation, we successfully were able to run our examples on the Google Colab environment. We cannot automate regular testing of our installation scripts and examples. Therefore, we share our instructions for the Merlin 22.12 version, but cannot guarantee that it will continuously work. -You can read how to run Merlin on Colab in [our blog](https://medium.com/nvidia-merlin/how-to-run-merlin-on-google-colab-83b5805c63e0). +You can read how to run Merlin on Colab in (our blog)[https://medium.com/nvidia-merlin/how-to-run-merlin-on-google-colab-83b5805c63e0]. From 74276f4f71ebc6632115b22dc689703490de2dc5 Mon Sep 17 00:00:00 2001 From: Benedikt Schifferer Date: Wed, 15 Feb 2023 15:37:23 +0000 Subject: [PATCH 4/5] depth level --- docs/source/INSTALL.md | 61 ++++++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 26 deletions(-) diff --git a/docs/source/INSTALL.md b/docs/source/INSTALL.md index 42ae2041f..65598ce06 100644 --- a/docs/source/INSTALL.md +++ b/docs/source/INSTALL.md @@ -1,36 +1,44 @@ # Installation +```{contents} +--- +depth: 2 +local: true +backlinks: none +--- +``` + Many users have different preferences on how to run their machine learning pipeline. We want to provide a guide for the most common platforms. Merlin can be easily installed via `pip`, but resolving the dependencies can be sometimes challenging (GPU Driver, TensorFlow/PyTorch, RAPIDs, Triton Inference Server). ## Docker (Preferred Option) -Our recommendation is to use our hosted docker containers, which are accessible on NVIDIA GPU Cloud (NCG) catalog at (https://catalog.ngc.nvidia.com/containers)[https://catalog.ngc.nvidia.com/containers]. +Our recommendation is to use our hosted docker containers, which are accessible on NVIDIA GPU Cloud (NCG) catalog at [https://catalog.ngc.nvidia.com/containers](https://catalog.ngc.nvidia.com/containers). | Container Name | Key Merlin Components | | ------------- | ------------- | -| (merlin-hugectr)[https://catalog.ngc.nvidia.com/orgs/nvidia/teams/merlin/containers/merlin-hugectr] | Merlin Libraries - in particular HugeCTR, Triton | -| (merlin-tensorflow)[https://catalog.ngc.nvidia.com/orgs/nvidia/teams/merlin/containers/merlin-tensorflow] | Merlin Libraries - in particular Merlin Models and SOK, Triton, TensorFlow | -| (merlin-pytorch)[https://catalog.ngc.nvidia.com/orgs/nvidia/teams/merlin/containers/merlin-pytorch] | Merlin Libraries - in particular Transformer4Rec, Triton, PyTorch | +| [merlin-hugectr](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/merlin/containers/merlin-hugectr) | Merlin Libraries - in particular HugeCTR, Triton | +| [merlin-tensorflow](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/merlin/containers/merlin-tensorflow) | Merlin Libraries - in particular Merlin Models and SOK, Triton, TensorFlow | +| [merlin-pytorch](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/merlin/containers/merlin-pytorch) | Merlin Libraries - in particular Transformer4Rec, Triton, PyTorch | -To use these containers, you must install the (NVIDIA Container Toolkit)[https://github.com/NVIDIA/nvidia-docker] to provide GPU support for Docker. +To use these containers, you must install the [NVIDIA Container Toolkit](https://github.com/NVIDIA/nvidia-docker) to provide GPU support for Docker. -You can find the Dockerfiles in our (GitHub repository)[https://github.com/NVIDIA-Merlin/Merlin/tree/main/docker] +You can find the Dockerfiles in our [GitHub repository](https://github.com/NVIDIA-Merlin/Merlin/tree/main/docker) You can use the NGC links referenced in the preceding table for more information about how to launch and run these containers. ## Using PIP -In some cases, you need to build your own docker container or build on top of another base image. You can install Merlin and its dependencies via `pip` for training your models with TensorFlow or PyTorch. Review the (Triton Documentation)[https://github.com/triton-inference-server/server#documentation] to install Triton Inference Server without docker or use our docker container. +In some cases, you need to build your own docker container or build on top of another base image. You can install Merlin and its dependencies via `pip` for training your models with TensorFlow or PyTorch. Review the [Triton Documentation](https://github.com/triton-inference-server/server#documentation) to install Triton Inference Server without docker or use our docker container. Pre-Requirements: -CUDA>=11.8 for (RAPIDs cuDF)[https://rapids.ai/pip.html]. An example installation can be found (here)[https://developer.nvidia.com/cuda-11-8-0-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=18.04&target_type=runfile_local] +CUDA>=11.8 for [RAPIDs cuDF](https://rapids.ai/pip.html). An example installation can be found [here](https://developer.nvidia.com/cuda-11-8-0-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=18.04&target_type=runfile_local) Python3.8 docker Image `nvcr.io/nvidia/cuda:11.8.0-devel-ubuntu22.04` or equivalent -docker with (NVIDIA Container Toolkit)[https://github.com/NVIDIA/nvidia-docker] +docker with [NVIDIA Container Toolkit](https://github.com/NVIDIA/nvidia-docker) 1. Installation of basic requirements, Python3.8 and other libraries via apt - ```shell +```shell apt update && \ apt install software-properties-common curl git -y && \ add-apt-repository ppa:deadsnakes/ppa -y @@ -40,9 +48,9 @@ apt update && \ python3.8 \ python3.8-dev \ python3.8-distutils \ - graphviz \ - Libcudnn8 - ``` + graphviz \ + libcudnn8 +``` 2. Create symbolic link to use python3.8 @@ -51,6 +59,7 @@ ln -s /usr/bin/python3.8 /usr/bin/python ``` 3. Install Pip + ```shell curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ python3.8 get-pip.py @@ -59,23 +68,23 @@ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ 4. Install RAPIDs cuDF ```shell - pip install cudf-cu11 dask-cudf-cu11 --extra-index-url=https://pypi.nvidia.com +pip install cudf-cu11 dask-cudf-cu11 --extra-index-url=https://pypi.nvidia.com ``` 5. Install preferred deep learning framework. It is possible to install both TensorFlow and PyTorch. ```shell - pip install tensorflow-gpu==2.9.2 # TensorFlow - pip install torchmetrics==0.10.0 torch --extra-index-url https://download.pytorch.org/whl/cu117 # PyTorch +pip install tensorflow-gpu==2.9.2 +pip install torchmetrics==0.10.0 torch --extra-index-url https://download.pytorch.org/whl/cu117 ``` 6. Install libraries via pip ```shell - pip install pytest fiddle wandb nest-asyncio testbook git+https://github.com/rapidsai/asvdb.git@main && \ - pip install scikit-learn tritonclient[all] && \ - pip install protobuf==3.20.3 pynvml ipython ipykernel graphviz && \ - pip install merlin-core nvtabular merlin-dataloader merlin-systems merlin-models transformers4rec +pip install pytest fiddle wandb nest-asyncio testbook git+https://github.com/rapidsai/asvdb.git@main && \ +pip install scikit-learn tritonclient[all] && \ +pip install protobuf==3.20.3 pynvml ipython ipykernel graphviz && \ +pip install merlin-core nvtabular merlin-dataloader merlin-systems merlin-models transformers4rec ``` @@ -85,22 +94,22 @@ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ ## Using Conda -In some cases, you need to build your own docker container or build on top of another base image. You can install Merlin and its dependencies via `conda` for training your models with TensorFlow or PyTorch. Review the (Triton Documentation)[https://github.com/triton-inference-server/server#documentation] to install Triton Inference Server without docker or use our docker container. +In some cases, you need to build your own docker container or build on top of another base image. You can install Merlin and its dependencies via `conda` for training your models with TensorFlow or PyTorch. Review the [Triton Documentation](https://github.com/triton-inference-server/server#documentation) to install Triton Inference Server without docker or use our docker container. Requirements: Docker Image: Ubuntu18.04 -## NVIDIA LaunchPad +## Hosted on NVIDIA LaunchPad -(NVIDIA LaunchPad)[https://www.nvidia.com/en-us/launchpad/] provides free, short-term access to many hands-on labs. We provide a hands-on tutorial for session-based recommender systems to predict the next item using Transformer4Rec in PyTorch. +[NVIDIA LaunchPad](https://www.nvidia.com/en-us/launchpad/) provides free, short-term access to many hands-on labs. We provide a hands-on tutorial for session-based recommender systems to predict the next item using Transformer4Rec in PyTorch. -Sign up and check it out for free: (Build Session-Based Recommenders on NVIDIA LaunchPad)[https://www.nvidia.com/en-us/launchpad/ai/build-session-based-recommenders/] +Sign up and check it out for free: [Build Session-Based Recommenders on NVIDIA LaunchPad](https://www.nvidia.com/en-us/launchpad/ai/build-session-based-recommenders/) After sign-up, it will take ˜3-5 business days until the request is granted. You will receive an email. -## Google Colab (experimental) +## Hosted on Google Colab (experimental) As Colab runs on Python3.8 and RAPIDs supports `pip` installation, we successfully were able to run our examples on the Google Colab environment. We cannot automate regular testing of our installation scripts and examples. Therefore, we share our instructions for the Merlin 22.12 version, but cannot guarantee that it will continuously work. -You can read how to run Merlin on Colab in (our blog)[https://medium.com/nvidia-merlin/how-to-run-merlin-on-google-colab-83b5805c63e0]. +You can read how to run Merlin on Colab in [our blog](https://medium.com/nvidia-merlin/how-to-run-merlin-on-google-colab-83b5805c63e0). From afc7b4ee04253da42f22787a3aa144877aa3f204 Mon Sep 17 00:00:00 2001 From: Benedikt Schifferer Date: Wed, 15 Feb 2023 16:01:39 +0000 Subject: [PATCH 5/5] conda --- docs/source/INSTALL.md | 90 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 86 insertions(+), 4 deletions(-) diff --git a/docs/source/INSTALL.md b/docs/source/INSTALL.md index 65598ce06..af2297e25 100644 --- a/docs/source/INSTALL.md +++ b/docs/source/INSTALL.md @@ -36,7 +36,7 @@ Python3.8 docker Image `nvcr.io/nvidia/cuda:11.8.0-devel-ubuntu22.04` or equivalent docker with [NVIDIA Container Toolkit](https://github.com/NVIDIA/nvidia-docker) -1. Installation of basic requirements, Python3.8 and other libraries via apt +1. Installation of basic requirements, Python3.8 and other libraries via `apt` ```shell apt update && \ @@ -87,8 +87,6 @@ pip install protobuf==3.20.3 pynvml ipython ipykernel graphviz && \ pip install merlin-core nvtabular merlin-dataloader merlin-systems merlin-models transformers4rec ``` - - [7. Optional: Clone the Merlin, Merlin Models or Transformer4Rec repositories to download the examples. **Important You need to checkout the version (tag) corresponding to the pip install**.] @@ -97,7 +95,91 @@ pip install merlin-core nvtabular merlin-dataloader merlin-systems merlin-models In some cases, you need to build your own docker container or build on top of another base image. You can install Merlin and its dependencies via `conda` for training your models with TensorFlow or PyTorch. Review the [Triton Documentation](https://github.com/triton-inference-server/server#documentation) to install Triton Inference Server without docker or use our docker container. Requirements: -Docker Image: Ubuntu18.04 +- Docker Image (Ubuntu18.04) +- NVIDIA Driver bsaed on [support matrix](https://nvidia-merlin.github.io/Merlin/main/support_matrix/index.html) + +1. Installation of basic requirements via `apt` + +```shell +sudo apt update -y && \ + sudo apt install -y build-essential && \ + sudo apt install -y --no-install-recommends software-properties-common +``` + +2. Install NVIDIA Driver. Find more versions [here](https://developer.nvidia.com/cuda-toolkit-archive) + +```shell +wget https://developer.download.nvidia.com/compute/cuda/11.4.1/local_installers/cuda_11.4.1_470.57.02_linux.run +sudo sh cuda_11.4.1_470.57.02_linux.run +``` + + +3. Install Python3.8 and other libraries via `apt` + +```shell +wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin && \ + sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600 && \ + sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub && \ + sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /" && \ + sudo apt-get update -y && sudo apt install -y --allow-change-held-packages git python3.8 python3-setuptools wget openssl libssl-dev zlib1g-dev libcudnn8 libcudnn8-dev +``` + +4. Install Miniconda + +```shell +wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.10.3-Linux-x86_64.sh && bash Miniconda3-py38_4.10.3-Linux-x86_64.sh -b +~/miniconda3/bin/conda init +bash +``` + +5. Install RAPIDs via `conda` and activate the environment. **Note: cudatoolkit version needs to match CUDA Version, which was installed at Step 2.** + +```shell +conda create -y -n rapids -c rapidsai -c nvidia -c conda-forge rapids=22.06 python=3.8 cudatoolkit=11.4 +conda activate rapids +``` + +6. Install additional libraries via `pip` + +```shell +pip install torch pytest torchmetrics testbook +git clone https://github.com/rapidsai/asvdb.git build-env && \ + pushd build-env && \ + python setup.py install && \ + popd && \ + rm -rf build-env +``` + +7. Install Merlin libraries via `pip` + +```shell +pip install merlin-core nvtabular merlin-dataloader merlin-systems merlin-models transformers4rec +``` + +8. Install more libraries and keep versions correct. + +```shell +pip install numpy==1.20.3 +pip install tensorflow-gpu==2.10.0 +pip install fiddle wandb +pip install numpy==1.20.3 +pip install protobuf==3.20.1 +``` + +9. Set symbolic link to avoid import errors for PyTorch - see [here](https://stackoverflow.com/questions/59366730/changing-order-of-imports-results-in-error-in-python) + +```shell +export LD_PRELOAD=~/miniconda3/pkgs/libstdcxx-ng-12.2.0-h46fd767_19/lib/libstdc++.so +``` + +10. Set symbolic link for TensorFlow - otherwise some operators will fail. + +```shell +ln -s ~/miniconda3/envs/rapids/lib/libcublas.so.11 ~/miniconda3/envs/rapids/lib/libcublas.so.10 +ln -s ~/miniconda3/envs/rapids/lib/libcublasLt.so.11 ~/miniconda3/envs/rapids/lib/libcublasLt.so.10 +``` + +[11. Optional: Clone the Merlin, Merlin Models or Transformer4Rec repositories to download the examples. **Important You need to checkout the version (tag) corresponding to the pip install**.] ## Hosted on NVIDIA LaunchPad