28 lines
1.4 KiB
Markdown
28 lines
1.4 KiB
Markdown
# 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.
|
|
|
|
I highly recommend rootless podman, as otherwise this will result with the ui running as root in a privileged container.
|
|
|
|
~~This targets Nvidia and Arch, and nothing else, I'm old and lazy.~~
|
|
|
|
It should work on anything that has an Nvidia GPU, podman, and the nvidia container toolkit (with the nvidia devices setup hook).
|
|
|
|
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).
|
|
|
|
# HOWTO
|
|
|
|
* [Set up GPU access in podman](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#configuring-podman)
|
|
* Run the following:
|
|
|
|
```
|
|
# Build the image
|
|
podman build --no-cache . -t 'stable-diffusion-ui-server'
|
|
|
|
# Run the container
|
|
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 -e NVIDIA_DRIVER_CAPABILITIES=compute,utility localhost/stable-diffusion-ui-server
|
|
|
|
# Get to the interface
|
|
browser http://localhost:9000
|
|
```
|