Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install Stable Diffusion WebUI on Ubuntu 22.04 with Nvidia GPU
# First install Docker and docker-compose following this guide:
# https://docs.docker.com/engine/install/ubuntu/
#
# Make sure you add your user to the `docker` group:
sudo usermod -aG docker $USER
# ...then log out and log back in to make that take effect. (I actually had to reboot, le sigh)
# Second install the NVIDIA Container Toolkit following this guide:
# https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#setting-up-nvidia-container-toolkit
# Clone the stable-diffusion-webui repo.
git clone https://github.com/sd-webui/stable-diffusion-webui.git
cd stable-diffusion-webui
cp .env_docker.example .env_docker
# Build the stable-diffusion environment.
docker-compose up -d
# ...takes a while. Monitor progress with `docker-compose logs -f`.
# Once you see "TODO", the environment is ready.
# Go to a browser and visit localhost:7860
# (Or elsewhere on the network, [ip]:7860)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment