From 1a57ad510fd78b8a3d80c0791ccc3f47f3fa187a Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 15 Aug 2023 11:07:28 +0300 Subject: [PATCH 1/3] #98 Extended .gitignore --- .gitignore | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.gitignore b/.gitignore index 9c0540651..f47239f3b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,18 @@ +.idea/ + +.DS_Store +._* +.~*# +*.pyc +*.swp +*.swo +*.swn +.svn +*.orig +*.egg-info +tmp/ +data/ + __pycache__ *.ckpt *.safetensors From e9a10368333da8ec335d0d0618ac22384964b7cd Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 15 Aug 2023 11:07:36 +0300 Subject: [PATCH 2/3] [98] Created .dockerignore --- .dockerignore | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..5fda9f429 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,102 @@ +.DS_Store + +tmp/ + +# Git +.git +.gitignore + +# CI +.codeclimate.yml +.travis.yml +.taskcluster.yml + +# Docker +.docker/ +Dockerfile + +celerybeat-schedule +celery_*.pid +# Byte-compiled / optimized / DLL files +__pycache__/ +*/__pycache__/ +*/*/__pycache__/ +*/*/*/__pycache__/ +*.py[cod] +*/*.py[cod] +*/*/*.py[cod] +*/*/*/*.py[cod] + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.cache +nosetests.xml +coverage.xml + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Virtual environment +.env/ +.venv/ +venv/ +.env + +# PyCharm +.idea + +# Python mode for VIM +.ropeproject +*/.ropeproject +*/*/.ropeproject +*/*/*/.ropeproject + +# Vim swap files +*.swp +*/*.swp +*/*/*.swp +*/*/*/*.swp + +tests/ From ac8a5acf1a9dde9e1d326b0bd0eecae736c96c8c Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 15 Aug 2023 11:08:01 +0300 Subject: [PATCH 3/3] [98] Created simple docker files --- .docker/Dockerfile | 16 ++++++++++++++++ .docker/docker-compose.yml | 9 +++++++++ 2 files changed, 25 insertions(+) create mode 100644 .docker/Dockerfile create mode 100755 .docker/docker-compose.yml diff --git a/.docker/Dockerfile b/.docker/Dockerfile new file mode 100644 index 000000000..124e4322f --- /dev/null +++ b/.docker/Dockerfile @@ -0,0 +1,16 @@ +FROM python:3.11.4-slim + +ENV WORKDIR /application/src/ + +WORKDIR ${WORKDIR} + +RUN apt update &&\ + apt install -y gcc g++ &&\ + rm -rf /var/lib/apt/lists/* + +ADD requirements_versions.txt . +RUN pip install -U pip &&\ + pip install -r requirements_versions.txt +# TODO: to move commands from launch.py =) + +ADD . . diff --git a/.docker/docker-compose.yml b/.docker/docker-compose.yml new file mode 100755 index 000000000..012e26b1c --- /dev/null +++ b/.docker/docker-compose.yml @@ -0,0 +1,9 @@ +version: "3.3" +services: + fooocus_back: + restart: always + build: + context: .. + dockerfile: .docker/Dockerfile + volumes: + - ..:/application/src/