stable-diffusion-ui-podman/README.md

28 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2023-10-24 18:15:34 +00:00
# What is this?
This repo is an easy way to run Easy Diffusion in a podman container. I needed to put Easy Diffusion into a container for my own purposes, and publishing this wasn't a lot of effort; so here we are.
2023-10-24 19:11:22 +00:00
I highly recommend rootless podman, as otherwise running the container will result in the ui running as root in a privileged container.
~~This targets Nvidia and Arch, and nothing else, I'm old and lazy.~~
2023-10-24 18:15:34 +00:00
It should work on anything that has an Nvidia GPU, podman, and the nvidia container toolkit (with the nvidia devices setup hook).
2023-10-23 01:48:33 +00:00
Note that there's currently an issue with the AUR packages for Nvidia's container toolkit. See [this issue](https://gitlab.com/nvidia/container-toolkit/container-toolkit/-/issues/17) for details and a [workaround](https://gitlab.com/nvidia/container-toolkit/container-toolkit/-/issues/17#note_1530784413).
2023-10-24 18:15:34 +00:00
# HOWTO
2023-10-23 01:48:33 +00:00
* [Set up GPU access in podman](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#configuring-podman)
* Run the following:
```
2023-10-23 01:57:34 +00:00
# Build the image
2023-10-25 13:11:23 +00:00
podman build . -t 'stable-diffusion-ui'
2023-10-23 01:57:34 +00:00
# Run the container
2023-10-25 13:11:13 +00:00
podman run -it --device nvidia.com/gpu=all --security-opt=label=disable --name stable-diffusion-ui -p 9000:9000 -v ./data:/opt/stable-diffusion-ui localhost/stable-diffusion-ui
2023-10-23 01:57:34 +00:00
# Get to the interface
browser http://localhost:9000
```