This guide assumes Linux + NVIDIA GPUs.
- CUDA 12.8 (see
FA3.md) - Conda
- Python 3.12.9
conda create -n pollux python=3.12.9
conda activate polluxpip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128pip install xformers ninja packaging
pip install -r requirements.txt- For FlashAttention v3 build instructions, see
FA3.md. - Quick install:
MAX_JOBS=128 python -m pip -v install flash-attn --no-build-isolationcd apps/Cosmos-Tokenizer
pip3 install -e .
cd ../..
python apps/main/test_vae.pypip install git+https://github.com/openai/CLIP.gitpip install timm torchmetricsIf you need mongoexport / mongoimport, install the MongoDB database tools via your distro package manager.
Example (Ubuntu):
sudo apt-get update
sudo apt-get install mongodb-database-toolsUse environment variables (see .env.sample) and avoid hardcoding credentials:
mongoexport --uri="mongodb+srv://${MONGODB_USER}:${MONGODB_PASSWORD}@${MONGODB_URI}" --db=world_model --collection=COLLECTION --out=out.json --jsonArray
mongoimport --uri="mongodb+srv://${MONGODB_USER}:${MONGODB_PASSWORD}@${MONGODB_URI}" --db=world_model --collection=COLLECTION --file=in.json --jsonArray