mirror of
https://github.com/AbdBarho/stable-diffusion-webui-docker.git
synced 2024-11-26 09:23:06 +03:00
555c26b7ce
## Justification Closes issue #352 This update makes the Dockerfiles OCI compliant, making it easier to use Buildah or other image building techniques that require it ## Implementation This changes a few things, listed below: * auto: Download container is switched to alpine. The `git` container specified the `/git` directory as a volume. As such, all the files under `/git` would be lost after each script invoke. Alpine is used later in the build process anyway, so it shouldn't be any extra cost to switch to it * auto: "New" clone.sh script is copied into the container, which is basically just the previous clone script that was embedded in the Dockerfile. * all: `<<EOF` heredoc styles have been switched to `&& \` * all: I added NVIDIA_DRIVER_CAPABILITIES and NVIDIA_VISIBLE_DEVICES to expose my Nvidia card. This is most likely a selinux/podman problem, but shouldn't change anything with docker to add it. * docker-compose: I added selinux labeling. I tested this with real docker (not just podman!) and it seems to work fine. Though I suggest you try it too. ## Testing Locally builds with buildah. Note: for caching to work properly, you still need to replace `/root/.cache/pip` with `/root/.cache/pip,Z` on selinux systems. Note: I was having some trouble running invoke. Thought it was this PR, but it's a known issue. See https://github.com/invoke-ai/InvokeAI/issues/3182 --------- Co-authored-by: AbdBarho <ka70911@gmail.com>
12 lines
186 B
Bash
12 lines
186 B
Bash
#!/bin/bash
|
|
|
|
set -Eeuox pipefail
|
|
|
|
mkdir -p /repositories/"$1"
|
|
cd /repositories/"$1"
|
|
git init
|
|
git remote add origin "$2"
|
|
git fetch origin "$3" --depth=1
|
|
git reset --hard "$3"
|
|
rm -rf .git
|