Installation#

Follow these steps to clone the Cosmos Transfer1 repository from GitHub and run the Docker container.

Note

Ensure you have the necessary hardware and software prerequisites before installation.

Cosmos-Transfer1 Setup#

  1. Clone the Cosmos-Transfer1 repository from GitHub.

    git clone git@github.com:nvidia-cosmos/cosmos-transfer1.git
    cd cosmos-transfer1
    git submodule update --init --recursive
    
  2. Set up the conda environment and install Cosmos-Transfer1 dependencies for the environment.

    # Create the cosmos-transfer1 conda environment.
    conda env create --file cosmos-transfer1.yaml
    # Activate the cosmos-transfer1 conda environment.
    conda activate cosmos-transfer1
    # Install the dependencies.
    pip install -r requirements.txt
    # Patch Transformer engine linking issues in conda environments.
    ln -sf $CONDA_PREFIX/lib/python3.10/site-packages/nvidia/*/include/* $CONDA_PREFIX/include/
    ln -sf $CONDA_PREFIX/lib/python3.10/site-packages/nvidia/*/include/* $CONDA_PREFIX/include/python3.10
    # Install Transformer engine.
    pip install transformer-engine[pytorch]==1.12.0
    
  3. Test the environment using the test_environment.py script.

    CUDA_HOME=$CONDA_PREFIX PYTHONPATH=$(pwd) python scripts/test_environment.py
    

Next Steps#

Follow the steps in the Transfer Quickstart Guide to try out running inference with a pre-trained Transfer model.