# syntax=docker/dockerfile:1 FROM alpine:3.17 as xformers RUN apk add --no-cache aria2 RUN aria2c -x 5 --dir / --out wheel.whl 'https://github.com/AbdBarho/stable-diffusion-webui-docker/releases/download/5.0.0/xformers-0.0.17.dev449-cp310-cp310-manylinux2014_x86_64.whl' FROM python:3.10-slim SHELL ["/bin/bash", "-ceuxo", "pipefail"] ENV DEBIAN_FRONTEND=noninteractive PIP_EXISTS_ACTION=w PIP_PREFER_BINARY=1 RUN --mount=type=cache,target=/root/.cache/pip pip install torch==1.13.1+cu117 torchvision --extra-index-url https://download.pytorch.org/whl/cu117 RUN apt-get update && apt-get install git -y && apt-get clean RUN git clone https://github.com/invoke-ai/InvokeAI.git /stable-diffusion WORKDIR /stable-diffusion RUN --mount=type=cache,target=/root/.cache/pip < req.txt pip install -r req.txt rm req.txt EOF # patch match: # https://github.com/invoke-ai/InvokeAI/blob/main/docs/installation/INSTALL_PATCHMATCH.md RUN <