* Add docker files * Add python precompiled cache file in the image * Add Notes in docker.md * Create docker-publish.yml * Modify docker-compose.yml not to use the bind mount * Update torch version * Change --share to --listen * Update torch version * Change '--share' to '--listen` * adjust code comments * Update requirements-docker.txt * chore: code cleanup - default_model env var isn't necessary as model is included in default preset, same for speed - ENV CMDARGS --listen is now synched with docker-compose.yml file - remove * Change entry_with_update.py to launch.py in entrypoint.sh * Change CMD in Dockerfile * Change default CMDARGS to --listen in Dockerfile * Modify CMD in Dockerfile * Fix docker-compose.yml * Import files from models,outputs * docs: change wording in docker.md, change git clone URL, add quotes to port mapping * docs: remove docker publish github action, remove pre-built image from docs * Modify modules versions for linux/arm64 * docs: update docker readme --------- Co-authored-by: Manuel Schmid <9307310+mashb1t@users.noreply.github.com> Co-authored-by: Manuel Schmid <dev@mash1t.de> Co-authored-by: Manuel Schmid <manuel.schmid@odt.net>
30 lines
1.1 KiB
Docker
30 lines
1.1 KiB
Docker
FROM nvidia/cuda:12.3.1-base-ubuntu22.04
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
ENV CMDARGS --listen
|
|
|
|
RUN apt-get update -y && \
|
|
apt-get install -y curl libgl1 libglib2.0-0 python3-pip python-is-python3 git && \
|
|
apt-get clean && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY requirements_docker.txt requirements_versions.txt /tmp/
|
|
RUN pip install --no-cache-dir -r /tmp/requirements_docker.txt -r /tmp/requirements_versions.txt && \
|
|
rm -f /tmp/requirements_docker.txt /tmp/requirements_versions.txt
|
|
RUN pip install --no-cache-dir xformers==0.0.22 --no-dependencies
|
|
RUN curl -fsL -o /usr/local/lib/python3.10/dist-packages/gradio/frpc_linux_amd64_v0.2 https://cdn-media.huggingface.co/frpc-gradio-0.2/frpc_linux_amd64 && \
|
|
chmod +x /usr/local/lib/python3.10/dist-packages/gradio/frpc_linux_amd64_v0.2
|
|
|
|
RUN adduser --disabled-password --gecos '' user && \
|
|
mkdir -p /content/app /content/data
|
|
|
|
COPY entrypoint.sh /content/
|
|
RUN chown -R user:user /content
|
|
|
|
WORKDIR /content
|
|
USER user
|
|
|
|
RUN git clone https://github.com/lllyasviel/Fooocus /content/app
|
|
RUN mv /content/app/models /content/app/models.org
|
|
|
|
CMD [ "sh", "-c", "/content/entrypoint.sh ${CMDARGS}" ]
|