2022-09-26 16:02:48 +03:00
|
|
|
# This file is part of stable-diffusion-webui (https://github.com/sd-webui/stable-diffusion-webui/).
|
|
|
|
|
|
|
|
# Copyright 2022 sd-webui team.
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Affero General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2022-09-20 10:21:47 +03:00
|
|
|
# Assumes host environment is AMD64 architecture
|
2022-09-07 01:50:14 +03:00
|
|
|
|
2022-09-20 10:21:47 +03:00
|
|
|
# We should use the Pytorch CUDA/GPU-enabled base image. See: https://hub.docker.com/r/pytorch/pytorch/tags
|
|
|
|
# FROM nvidia/cuda:11.3.1-runtime-ubuntu20.04
|
2022-09-11 16:58:33 +03:00
|
|
|
|
2022-09-20 10:21:47 +03:00
|
|
|
# Assumes AMD64 host architecture
|
|
|
|
FROM pytorch/pytorch:1.12.1-cuda11.3-cudnn8-runtime
|
|
|
|
|
|
|
|
WORKDIR /install
|
2022-09-07 01:50:14 +03:00
|
|
|
|
|
|
|
SHELL ["/bin/bash", "-c"]
|
|
|
|
|
|
|
|
RUN apt-get update && \
|
2022-09-20 10:21:47 +03:00
|
|
|
apt-get install -y wget git && \
|
2022-09-07 01:50:14 +03:00
|
|
|
apt-get clean && \
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2022-09-20 10:21:47 +03:00
|
|
|
COPY ./requirements.txt /install/
|
2022-09-27 00:42:02 +03:00
|
|
|
|
2022-09-20 10:21:47 +03:00
|
|
|
RUN pip install -r /install/requirements.txt
|
2022-09-27 00:42:02 +03:00
|
|
|
# From base image. We need opencv-python-headless so we uninstall here
|
|
|
|
RUN pip uninstall -y opencv-python && pip install opencv-python-headless==4.6.0.66
|
2022-09-20 10:21:47 +03:00
|
|
|
|
2022-09-07 01:50:14 +03:00
|
|
|
# Install font for prompt matrix
|
|
|
|
COPY /data/DejaVuSans.ttf /usr/share/fonts/truetype/
|
|
|
|
|
2022-09-20 10:21:47 +03:00
|
|
|
ENV PYTHONPATH=/sd
|
|
|
|
|
2022-09-14 01:41:54 +03:00
|
|
|
EXPOSE 7860 8501
|
2022-09-07 01:50:14 +03:00
|
|
|
|
|
|
|
COPY ./entrypoint.sh /sd/
|
|
|
|
ENTRYPOINT /sd/entrypoint.sh
|
2022-09-20 10:21:47 +03:00
|
|
|
|