Running Nvidia COSMOS on A100 80Gb

Video Example
https://www.youtube.com/shorts/I4lWD4wamLI

How to run Nvidia Cosmos on Ubuntu 22.04

In this tutorial, you’ll learn how to quickly set up Ubuntu 22.04 to run Nvidia Cosmos. This involves installing the necessary drivers, Docker,…


This content originally appeared on DEV Community and was authored by Juan Felipe Lujan

Video Example
https://www.youtube.com/shorts/I4lWD4wamLI

How to run Nvidia Cosmos on Ubuntu 22.04

In this tutorial, you'll learn how to quickly set up Ubuntu 22.04 to run Nvidia Cosmos. This involves installing the necessary drivers, Docker, and CUDA dependencies.

Thanks to the Google Developers Experts program for providing the infra for this experiment 🧪

Prequisites

  1. Ubuntu 22.04 doh.
  2. A beefy Nvidia GPU. 30Gb+ of VRAM. Either Blackwell, Hopper, or Ampere.
  3. 200Gb+ of local storage.

Step1: Run Script 1

curl -o- https://raw.githubusercontent.com/FelipeLujan/GCPexperiments/refs/heads/master/NvidiaCosmos/prepare_ubuntu%20_part1.sh | bash

Script 1 updates Ubuntu, installs Nvidia drivers, and reboots to finalize changes.

Script 2

Run once your is back up.

curl -o- https://raw.githubusercontent.com/FelipeLujan/GCPexperiments/refs/heads/master/NvidiaCosmos/prepare_ubuntu_part2.sh | bash

Script 2 installs Docker, configures the Nvidia toolkit, then clones and builds the Cosmos repository.

If you see something like this at the end of Script 2, congratulations, your docker container is almost ready to run Cosmos.

+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.216.03             Driver Version: 535.216.03   CUDA Version: 12.6     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA A100-SXM4-80GB          Off | 00000000:00:05.0 Off |                    0 |
| N/A   32C    P0              57W / 400W |      0MiB / 81920MiB |     24%      Default |
|                                         |                      |             Disabled |
+-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|  No running processes found                                                           |
+---------------------------------------------------------------------------------------+

Downloading cosmos models in Docker Container.

At this point, your command line is attached to the costmos_container docker, run huggingface-cli login and insert your Hugging Face Token.

Generate it here https://huggingface.co/settings/tokens you only need to Check grant Read access to contents of all public gated repos you can access

Download only the 7B Text2Video model by running this command.

PYTHONPATH=$(pwd) python cosmos1/scripts/download_diffusion.py --model_sizes 7B 14B --model_types Text2World Video2World

This download is over 50Gb. Give it a few minutes.

Generate a video from a text prompt.

PROMPT="A sleek, humanoid robot stands in a vast warehouse filled with neatly stacked cardboard boxes on industrial shelves. \
The robot's metallic body gleams under the bright, even lighting, highlighting its futuristic design and intricate joints. \
A glowing blue light emanates from its chest, adding a touch of advanced technology. The background is dominated by rows of boxes, \
suggesting a highly organized storage system. The floor is lined with wooden pallets, enhancing the industrial setting. \
The camera remains static, capturing the robot's poised stance amidst the orderly environment, with a shallow depth of \
field that keeps the focus on the robot while subtly blurring the background for a cinematic effect."

# Example using 7B model
PYTHONPATH=$(pwd) python cosmos1/models/diffusion/inference/text2world.py \
    --checkpoint_dir checkpoints \
    --diffusion_transformer_dir Cosmos-1.0-Diffusion-7B-Text2World \
    --prompt "$PROMPT" \
    --offload_prompt_upsampler \
    --video_save_name Cosmos-1.0-Diffusion-7B-Text2World


This content originally appeared on DEV Community and was authored by Juan Felipe Lujan


Print Share Comment Cite Upload Translate Updates
APA

Juan Felipe Lujan | Sciencx (2025-01-13T01:32:48+00:00) Running Nvidia COSMOS on A100 80Gb. Retrieved from https://www.scien.cx/2025/01/13/running-nvidia-cosmos-on-a100-80gb/

MLA
" » Running Nvidia COSMOS on A100 80Gb." Juan Felipe Lujan | Sciencx - Monday January 13, 2025, https://www.scien.cx/2025/01/13/running-nvidia-cosmos-on-a100-80gb/
HARVARD
Juan Felipe Lujan | Sciencx Monday January 13, 2025 » Running Nvidia COSMOS on A100 80Gb., viewed ,<https://www.scien.cx/2025/01/13/running-nvidia-cosmos-on-a100-80gb/>
VANCOUVER
Juan Felipe Lujan | Sciencx - » Running Nvidia COSMOS on A100 80Gb. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/01/13/running-nvidia-cosmos-on-a100-80gb/
CHICAGO
" » Running Nvidia COSMOS on A100 80Gb." Juan Felipe Lujan | Sciencx - Accessed . https://www.scien.cx/2025/01/13/running-nvidia-cosmos-on-a100-80gb/
IEEE
" » Running Nvidia COSMOS on A100 80Gb." Juan Felipe Lujan | Sciencx [Online]. Available: https://www.scien.cx/2025/01/13/running-nvidia-cosmos-on-a100-80gb/. [Accessed: ]
rf:citation
» Running Nvidia COSMOS on A100 80Gb | Juan Felipe Lujan | Sciencx | https://www.scien.cx/2025/01/13/running-nvidia-cosmos-on-a100-80gb/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.