Skip to content

Instantly share code, notes, and snippets.

@LeonStoldt
Last active August 30, 2022 16:25
Show Gist options
  • Save LeonStoldt/5789add6a8446d72ce1beb91c1b66f6c to your computer and use it in GitHub Desktop.
Save LeonStoldt/5789add6a8446d72ce1beb91c1b66f6c to your computer and use it in GitHub Desktop.
Installing Stable Diffusion (incl. Web UI) - Local Docker Setup

Stable Diffusion

Aug 30 2022

This guide explains steps that I've done to install Stable Diffusion with a web interface.

Tested on:

  • OS: Linux-x86_64 (Ubuntu 22.04.1 LTS) VM
  • Nvidia Driver Version: 515.65.01
  • Graphics Card: NVIDIA GeForce RTX 3090

Requirements

  • NVIDIA GPU supporting CUDA 11.3+
  • Docker
  • docker-compose v2+
  • git

Installation

I chose one of the forks of the original stable diffusion which is created by hlky and provides an easy to use docker setup and a web UI. This repository already provides a detailed installation description which can be checked out for further information.

  1. Checkout the stable-diffusion repository and move into the directory
git clone [email protected]:hlky/stable-diffusion.git && cd stable-diffusion
  1. If not already installed, install the nvidia container toolkit To validate that it is installed correctly, you can run:
sudo docker run --rm --gpus all nvidia/cuda:11.0.3-base-ubuntu20.04 nvidia-smi
  1. Start the docker-compose file: (This might take some time. For me, it took 8 minutes)
docker-compose up

Start using

Open http://127.0.0.1:7860/ to visit the UI and start experimenting. Have fun!

Thanks to

  • Ture for giving me the hint of stable-diffusion and the fork including the web UI
  • hlky for providing such an amazing repository
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment