mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
3f6d0fb7da
* update dockerfile * remove not existing file from .dockerignore * remove bloat and unecesary step also use --no-cache-dir for pip install image is now close to 2GB * make Dockerfile a variable * set base image to `ubuntu:22.10` * add build-essential * link outputs folder for persistence * update tag variable * update docs * fix not customizeable build args, add reqs output
42 lines
917 B
Docker
42 lines
917 B
Docker
FROM ubuntu:22.10
|
|
|
|
# use bash
|
|
SHELL [ "/bin/bash", "-c" ]
|
|
|
|
# Install necesarry packages
|
|
RUN apt-get update \
|
|
&& apt-get install -y \
|
|
--no-install-recommends \
|
|
build-essential \
|
|
gcc \
|
|
git \
|
|
libgl1-mesa-glx \
|
|
libglib2.0-0 \
|
|
pip \
|
|
python3 \
|
|
python3-dev \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
ARG PIP_REQUIREMENTS=requirements-lin-cuda.txt
|
|
ARG PROJECT_NAME=invokeai
|
|
ARG INVOKEAI_ROOT=/data
|
|
ENV INVOKEAI_ROOT=${INVOKEAI_ROOT}
|
|
|
|
# set workdir and copy sources
|
|
WORKDIR /${PROJECT_NAME}
|
|
COPY . .
|
|
|
|
# install requirements and link outputs folder
|
|
RUN cp \
|
|
./environments-and-requirements/${PIP_REQUIREMENTS} \
|
|
${PIP_REQUIREMENTS} \
|
|
&& pip install \
|
|
--no-cache-dir \
|
|
-r ${PIP_REQUIREMENTS} \
|
|
&& ln -sf /data/outputs /${PROJECT_NAME}/outputs
|
|
|
|
# set Entrypoint and default CMD
|
|
ENTRYPOINT [ "python3" ]
|
|
CMD [ "scripts/invoke.py", "--web", "--host", "0.0.0.0" ]
|