This port provides a Linux Python environment tailored for running Stable Diffusion models on NVIDIA GPUs. It includes:
- A preconfigured Python environment with dependencies for Stable Diffusion and PyTorch examples.
- PyTorch examples.
- Sample scripts for running Stable Diffusion model and PyTorch examples.
To utilize CUDA support, make sure that appropriate NVidia drivers are installed:
pkg install linux-nvidia-libs nvidia-driver
To play with Stable Diffusion copy it to a user-writable directory, edit at will
and launch it via ai-ml-env-python:
cp /usr/local/share/ai-ml-env/stable-diffusion-sample.py ~/
ai-ml-env-python ~/stable-diffusion-sample.py
This will download data packages into ~/.cache/huggingface/hub/ during the
first-time run.
The port also provides Pytorch examples from the official GitHub repository.
To run and modify these examples, copy them to a user-writable directory
and then launch the entry point script via ai-ml-env-bash:
cp -r /usr/local/share/ai-ml-env/pytorch-examples ~/pytorch-examples
cd ~/pytorch-examples && ai-ml-env-bash ./run_python_examples.sh
You can then run
ai-ml-env-bash ./run_python_examples.sh clean
to remove downloaded data or just remove the whole directory to clean up
everything.
science/linux-ai-ml-env: Remove dependency on nvidia-driver
Instead, ask user to install it via pkg-message. This allows choosing between
nvidia-driver and nvidia-driver-devel, until we get provides/requires.
PR: 291139
science/linux-ai-ml-env: Update to 1.0.1
This updates the Conda environment and brings Python 25.9.1 as well numerous
dependencies updates.
Approved by: maintainer (via Matrix)