Created
December 15, 2021 00:35
-
-
Save eugeneyan/b2075778620057593535693712242177 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Start a SageMaker notebook instance (ml.p3.2xlarge) and open a terminal | |
# Upload the conda yml from here: https://gist.github.com/eugeneyan/3435e05dd675b9ee2af164214536752d | |
# Install NVTabular | |
conda env create -f=SageMaker/nvt_t4r.yml | |
# Activate conda env | |
source anaconda3/etc/profile.d/conda.sh | |
conda activate nvt_t4r | |
# Install pytorch with cuda enabled | |
conda install -y -c conda-forge pytorch-gpu | |
# Install the rest of the libraries | |
conda install -y -c nvidia -c rapidsai -c numba -c conda-forge transformers4rec | |
conda install -y tensorflow torchmetrics ipykernel | |
# Create jupyter kernel | |
python -m ipykernel install --user --name=nvt_t4r | |
# Start a notebook with the nvt_t4r kernel. You should be able to run the following fine. | |
import cudf | |
import cupy | |
import nvtabular as nvt | |
from merlin_standard_lib import Schema | |
from transformers4rec import torch as tr | |
from transformers4rec.torch.utils.examples_utils import fit_and_evaluate | |
from transformers4rec.torch.utils.data_utils import NVTabularDataLoader | |
import torch | |
torch.cuda.is_available() | |
# Try running the tutorial from here: https://github.com/NVIDIA-Merlin/Transformers4Rec/tree/main/examples/tutorial |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment