diff --git a/.github/docker-image.yml b/.github/docker-image.yml new file mode 100644 index 0000000..0cd84fe --- /dev/null +++ b/.github/docker-image.yml @@ -0,0 +1,36 @@ +name: ci + +on: + push: + branches: + - 'main' + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile.v2.6 + no-cache: true + push: true + tags: camenduru/webui:v2.6 + diff --git a/Dockerfile.v2.6 b/Dockerfile.v2.6 new file mode 100644 index 0000000..2e8f598 --- /dev/null +++ b/Dockerfile.v2.6 @@ -0,0 +1,21 @@ +FROM nvidia/cuda:12.2.0-base-ubuntu22.04 +ENV DEBIAN_FRONTEND noninteractive + +RUN apt-get update -y && \ + apt-get install -y aria2 libgl1 libglib2.0-0 wget git git-lfs python3-pip python-is-python3 && \ + pip install -q torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2+cu118 torchtext==0.15.2 torchdata==0.6.1 --extra-index-url https://download.pytorch.org/whl/cu118 && \ + pip install xformers==0.0.20 triton==2.0.0 packaging==23.1 && \ + adduser --disabled-password --gecos '' user && \ + mkdir /content && \ + chown -R user:user /content + +WORKDIR /content +USER user + +RUN git clone -b v2.6 https://github.com/camenduru/stable-diffusion-webui && \ + sed -i -e 's/ start()/ #start()/g' /content/stable-diffusion-webui/launch.py && \ + cd /content/stable-diffusion-webui && \ + python launch.py --skip-torch-cuda-test && \ + git reset --hard + +CMD cd /content/stable-diffusion-webui && python launch.py --cors-allow-origins=* --xformers --listen --theme dark --api