11# syntax=docker/dockerfile:1
22
3- FROM continuumio/miniconda3:4.12.0
3+ FROM python:3.10-slim
44
55SHELL ["/bin/bash" , "-ceuxo" , "pipefail" ]
66
77ENV DEBIAN_FRONTEND=noninteractive PIP_EXISTS_ACTION=w PIP_PREFER_BINARY=1 PIP_NO_CACHE_DIR=1
88
9- # now it requires python3.9
10- RUN conda install python=3.9 && conda clean -a -y
11- RUN conda install cudatoolkit=11.6 -c conda-forge && conda clean -a -y
12- RUN conda install pytorch==1.12.1 -c pytorch && conda clean -a -y
139
14- RUN apt-get update && apt install fonts-dejavu-core -y && apt-get clean
10+ RUN pip install torch==1.13.0 torchvision --extra-index-url https://download.pytorch.org/whl/cu117
11+
12+ RUN apt-get update && apt-get install git -y && apt-get clean
13+
14+ RUN git clone https://github.com/invoke-ai/InvokeAI.git /stable-diffusion
15+
16+ WORKDIR /stable-diffusion
1517
1618RUN <<EOF
17- git clone https://github.com/invoke-ai/InvokeAI.git stable-diffusion
18- cd stable-diffusion
19- git reset --hard 6b89adfa7ebd4591ed91a76ecf152e3517cda385
19+ git reset --hard 2b7e3abe57963d199f1d825ddef87ae154c81045
2020git config --global http.postBuffer 1048576000
21- conda env update --file environment.yml -n base
22- conda clean -a -y
21+ ln -sf environments-and-requirements/requirements-lin-cuda.txt requirements.txt
22+ pip install -r requirements.txt
2323EOF
2424
2525
26- ARG BRANCH=main SHA=6b89adfa7ebd4591ed91a76ecf152e3517cda385
26+ ARG BRANCH=development SHA=2b7e3abe57963d199f1d825ddef87ae154c81045
2727RUN <<EOF
28- cd stable-diffusion
2928git fetch
3029git reset --hard
3130git checkout ${BRANCH}
3231git reset --hard ${SHA}
33- conda env update --file environment.yml -n base
34- conda clean -a -y
32+ pip install -r requirements.txt
3533EOF
3634
3735RUN pip uninstall opencv-python -y && pip install --force-reinstall opencv-python-headless==4.5.5.64
@@ -42,8 +40,7 @@ python3 /docker/info.py /stable-diffusion/frontend/dist/index.html
4240EOF
4341
4442
45- ENV PRELOAD=false CLI_ARGS=""
46- WORKDIR /stable-diffusion
43+ ENV ROOT=/stable-diffusion PRELOAD=false CLI_ARGS=""
4744EXPOSE 7860
4845
4946
0 commit comments