2022-11-28 17:20:25 +00:00
|
|
|
FROM ubuntu:22.10
|
2022-10-24 22:01:10 +00:00
|
|
|
|
|
|
|
# use bash
|
|
|
|
SHELL [ "/bin/bash", "-c" ]
|
|
|
|
|
|
|
|
# Install necesarry packages
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -y \
|
|
|
|
--no-install-recommends \
|
2022-11-28 17:20:25 +00:00
|
|
|
build-essential \
|
2022-10-24 22:01:10 +00:00
|
|
|
gcc \
|
|
|
|
git \
|
|
|
|
libgl1-mesa-glx \
|
|
|
|
libglib2.0-0 \
|
|
|
|
pip \
|
|
|
|
python3 \
|
|
|
|
python3-dev \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2022-11-28 17:20:25 +00:00
|
|
|
# set workdir and copy sources
|
2022-11-29 15:04:03 +00:00
|
|
|
WORKDIR /invokeai
|
|
|
|
ARG PIP_REQUIREMENTS=requirements-lin-cuda.txt
|
|
|
|
COPY . ./environments-and-requirements/${PIP_REQUIREMENTS} ./
|
2022-11-28 17:20:25 +00:00
|
|
|
|
|
|
|
# install requirements and link outputs folder
|
2022-11-29 15:04:03 +00:00
|
|
|
RUN pip install \
|
|
|
|
--no-cache-dir \
|
|
|
|
-r ${PIP_REQUIREMENTS}
|
2022-11-28 17:20:25 +00:00
|
|
|
|
2022-11-29 15:04:03 +00:00
|
|
|
# set Environment, Entrypoint and default CMD
|
|
|
|
ENV INVOKEAI_ROOT /data
|
|
|
|
ENTRYPOINT [ "python3", "scripts/invoke.py", "--outdir=/data/outputs" ]
|
|
|
|
CMD [ "--web", "--host=0.0.0.0" ]
|