From 34d432c8bd39c26b38d9956cb676906065709577 Mon Sep 17 00:00:00 2001 From: xynydev <60004820+xynydev@users.noreply.github.com> Date: Wed, 24 Apr 2024 21:00:14 +0300 Subject: [PATCH 01/19] chore: update cuda version in container --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b969cd0e..fc36c61f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM nvidia/cuda:12.3.1-base-ubuntu22.04 +FROM nvidia/cuda:12.4.0-base-ubuntu22.04 ENV DEBIAN_FRONTEND noninteractive ENV CMDARGS --listen From 13416a9cda93e6d69e8c0535bc99807ed6199856 Mon Sep 17 00:00:00 2001 From: xynydev <60004820+xynydev@users.noreply.github.com> Date: Wed, 24 Apr 2024 21:00:40 +0300 Subject: [PATCH 02/19] fix: use symlink to fix error libcuda.so: cannot open shared object file: --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index fc36c61f..045107d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,9 @@ RUN pip install --no-cache-dir xformers==0.0.23 --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 +# fix Error: libcuda.so: cannot open shared object file: +RUN ln -s /usr/lib64/libcuda.so.550.67 /usr/lib64/libcuda.so + RUN adduser --disabled-password --gecos '' user && \ mkdir -p /content/app /content/data From 33d3df798813c0e572934e1b86a9b1021d991c47 Mon Sep 17 00:00:00 2001 From: xynydev <60004820+xynydev@users.noreply.github.com> Date: Wed, 24 Apr 2024 21:01:38 +0300 Subject: [PATCH 03/19] fix: update docker entrypoint to use entry_with_update.py --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index d0dba09c..346ad675 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -30,4 +30,4 @@ mklink outputs import outputs # Start application -python launch.py $* +python entry_with_update.py $* From a6a71fe43e7d12e039bddd50ff4095e3fb2e0981 Mon Sep 17 00:00:00 2001 From: xynydev <60004820+xynydev@users.noreply.github.com> Date: Wed, 24 Apr 2024 21:15:32 +0300 Subject: [PATCH 04/19] feat: add container build & push workflow --- .github/dependabot.yml | 6 ++++ .github/workflows/build_container.yml | 43 +++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/build_container.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..adee0ed1 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" \ No newline at end of file diff --git a/.github/workflows/build_container.yml b/.github/workflows/build_container.yml new file mode 100644 index 00000000..27509bff --- /dev/null +++ b/.github/workflows/build_container.yml @@ -0,0 +1,43 @@ +name: Create and publish a container image + +on: + push: + branches: ['release'] + +env: + REGISTRY: ghcr.io + IMAGE_NAME: fooocus + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Log in to the Container registry + uses: docker/login-action@3.1.0 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@5.5.1 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Build and push Docker image + uses: docker/build-push-action@5.3.0 + with: + context: . + file: ./Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file From 21bea9a0403c5cefe314fa9836abc9a676f9e714 Mon Sep 17 00:00:00 2001 From: xynydev <60004820+xynydev@users.noreply.github.com> Date: Wed, 24 Apr 2024 21:20:40 +0300 Subject: [PATCH 05/19] fix: container action run conditions --- .github/workflows/build_container.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_container.yml b/.github/workflows/build_container.yml index 27509bff..7550e45b 100644 --- a/.github/workflows/build_container.yml +++ b/.github/workflows/build_container.yml @@ -2,7 +2,9 @@ name: Create and publish a container image on: push: - branches: ['release'] + branches: + - main + pull_request: env: REGISTRY: ghcr.io @@ -32,6 +34,10 @@ jobs: uses: docker/metadata-action@5.5.1 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=ref,event=branch + type=ref,event=pr + type=sha - name: Build and push Docker image uses: docker/build-push-action@5.3.0 From 1fb78e581d15dda49b4abff420ba386d3357c78a Mon Sep 17 00:00:00 2001 From: xynydev <60004820+xynydev@users.noreply.github.com> Date: Wed, 24 Apr 2024 21:23:00 +0300 Subject: [PATCH 06/19] fix: container action versions --- .github/workflows/build_container.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_container.yml b/.github/workflows/build_container.yml index 7550e45b..980f0449 100644 --- a/.github/workflows/build_container.yml +++ b/.github/workflows/build_container.yml @@ -23,7 +23,7 @@ jobs: uses: actions/checkout@v4 - name: Log in to the Container registry - uses: docker/login-action@3.1.0 + uses: docker/login-action@3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -31,7 +31,7 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@5.5.1 + uses: docker/metadata-action@5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | @@ -40,7 +40,7 @@ jobs: type=sha - name: Build and push Docker image - uses: docker/build-push-action@5.3.0 + uses: docker/build-push-action@5 with: context: . file: ./Dockerfile From 7066892ded1498b628d5347864b37bcb9a3bc368 Mon Sep 17 00:00:00 2001 From: xynydev <60004820+xynydev@users.noreply.github.com> Date: Wed, 24 Apr 2024 21:24:15 +0300 Subject: [PATCH 07/19] fix: container action versions v2 --- .github/workflows/build_container.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_container.yml b/.github/workflows/build_container.yml index 980f0449..aca3a5e8 100644 --- a/.github/workflows/build_container.yml +++ b/.github/workflows/build_container.yml @@ -23,7 +23,7 @@ jobs: uses: actions/checkout@v4 - name: Log in to the Container registry - uses: docker/login-action@3 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -31,7 +31,7 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@5 + uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | @@ -40,7 +40,7 @@ jobs: type=sha - name: Build and push Docker image - uses: docker/build-push-action@5 + uses: docker/build-push-action@v5 with: context: . file: ./Dockerfile From e0a42222d5ffab1dbb22e73cdabeb976f889f1d2 Mon Sep 17 00:00:00 2001 From: xynydev <60004820+xynydev@users.noreply.github.com> Date: Wed, 24 Apr 2024 21:34:30 +0300 Subject: [PATCH 08/19] fix: docker action registry login and metadata --- .github/workflows/build_container.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_container.yml b/.github/workflows/build_container.yml index aca3a5e8..6d81fb5b 100644 --- a/.github/workflows/build_container.yml +++ b/.github/workflows/build_container.yml @@ -7,7 +7,6 @@ on: pull_request: env: - REGISTRY: ghcr.io IMAGE_NAME: fooocus jobs: @@ -25,15 +24,15 @@ jobs: - name: Log in to the Container registry uses: docker/login-action@v3 with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} + registry: ghcr.io + username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v5 with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + images: ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} tags: | type=ref,event=branch type=ref,event=pr From 37662aeabd187aeae4c36d9edb1d2d2c6e203539 Mon Sep 17 00:00:00 2001 From: xynydev <60004820+xynydev@users.noreply.github.com> Date: Wed, 24 Apr 2024 21:57:02 +0300 Subject: [PATCH 09/19] docs: adjust docker documentation based on latest changes, add docs for podman and docker --- docker-compose.yml | 2 +- docker.md | 82 +++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 74 insertions(+), 10 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index dee7b3e7..a573a915 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ volumes: services: app: build: . - image: fooocus + image: ghcr.io/lllyasviel/fooocus ports: - "7865:7865" environment: diff --git a/docker.md b/docker.md index 36cfa632..137f67b9 100644 --- a/docker.md +++ b/docker.md @@ -1,35 +1,99 @@ # Fooocus on Docker -The docker image is based on NVIDIA CUDA 12.3 and PyTorch 2.0, see [Dockerfile](Dockerfile) and [requirements_docker.txt](requirements_docker.txt) for details. +The docker image is based on NVIDIA CUDA 12.4 and PyTorch 2.0, see [Dockerfile](Dockerfile) and [requirements_docker.txt](requirements_docker.txt) for details. + +## Requirements + +- A computer with specs good enough to run Fooocus, and proprietary Nvidia drivers +- Docker, Docker Compose, or Podman ## Quick start -**This is just an easy way for testing. Please find more information in the [notes](#notes).** +**More information in the [notes](#notes).** + +### Running with Docker Compose 1. Clone this repository -2. Build the image with `docker compose build` -3. Run the docker container with `docker compose up`. Building the image takes some time. +2. Run the docker container with `docker compose up`. + +### Running with Docker + +```sh +docker run -p 7865:7865 -v fooocus-data:/content/data -it \ +--gpus all \ +-e CMDARGS=--listen \ +-e DATADIR=/content/data \ +-e config_path=/content/data/config.txt \ +-e config_example_path=/content/data/config_modification_tutorial.txt \ +-e path_checkpoints=/content/data/models/checkpoints/ \ +-e path_loras=/content/data/models/loras/ \ +-e path_embeddings=/content/data/models/embeddings/ \ +-e path_vae_approx=/content/data/models/vae_approx/ \ +-e path_upscale_models=/content/data/models/upscale_models/ \ +-e path_inpaint=/content/data/models/inpaint/ \ +-e path_controlnet=/content/data/models/controlnet/ \ +-e path_clip_vision=/content/data/models/clip_vision/ \ +-e path_fooocus_expansion=/content/data/models/prompt_expansion/fooocus_expansion/ \ +-e path_outputs=/content/app/outputs/ \ +ghcr.io/lllyasviel/fooocus +``` +### Running with Podman + +```sh +podman run -p 7865:7865 -v fooocus-data:/content/data -it \ +--security-opt=no-new-privileges --cap-drop=ALL --security-opt label=type:nvidia_container_t --device=nvidia.com/gpu=all \ +-e CMDARGS=--listen \ +-e DATADIR=/content/data \ +-e config_path=/content/data/config.txt \ +-e config_example_path=/content/data/config_modification_tutorial.txt \ +-e path_checkpoints=/content/data/models/checkpoints/ \ +-e path_loras=/content/data/models/loras/ \ +-e path_embeddings=/content/data/models/embeddings/ \ +-e path_vae_approx=/content/data/models/vae_approx/ \ +-e path_upscale_models=/content/data/models/upscale_models/ \ +-e path_inpaint=/content/data/models/inpaint/ \ +-e path_controlnet=/content/data/models/controlnet/ \ +-e path_clip_vision=/content/data/models/clip_vision/ \ +-e path_fooocus_expansion=/content/data/models/prompt_expansion/fooocus_expansion/ \ +-e path_outputs=/content/app/outputs/ \ +ghcr.io/lllyasviel/fooocus +``` When you see the message `Use the app with http://0.0.0.0:7865/` in the console, you can access the URL in your browser. -Your models and outputs are stored in the `fooocus-data` volume, which, depending on OS, is stored in `/var/lib/docker/volumes`. +Your models and outputs are stored in the `fooocus-data` volume, which, depending on OS, is stored in `/var/lib/docker/volumes/` (or `~/.local/share/containers/storage/volumes/` when using `podman`). + +## Building the container locally + +Clone the repository first, and open a terminal in the folder. + +Build with `docker`: +```sh +docker build . -t fooocus +``` + +Build with `podman`: +```sh +podman build . -t fooocus +``` ## Details -### Update the container manually +### Update the container manually (`docker-compose`) When you are using `docker compose up` continuously, the container is not updated to the latest version of Fooocus automatically. Run `git pull` before executing `docker compose build --no-cache` to build an image with the latest Fooocus version. You can then start it with `docker compose up` ### Import models, outputs -If you want to import files from models or the outputs folder, you can uncomment the following settings in the [docker-compose.yml](docker-compose.yml): + +If you want to import files from models or the outputs folder, you can add the following bind mounts in the [docker-compose.yml](docker-compose.yml) or your preferred method of running the container: ``` #- ./models:/import/models # Once you import files, you don't need to mount again. #- ./outputs:/import/outputs # Once you import files, you don't need to mount again. ``` -After running `docker compose up`, your files will be copied into `/content/data/models` and `/content/data/outputs` -Since `/content/data` is a persistent volume folder, your files will be persisted even when you re-run `docker compose up --build` without above volume settings. +After running the container, your files will be copied into `/content/data/models` and `/content/data/outputs` +Since `/content/data` is a persistent volume folder, your files will be persisted even when you re-run the container without the above mounts. ### Paths inside the container From 7efa30042113eb93973d8de0d410a1b2ce0d72df Mon Sep 17 00:00:00 2001 From: xyny <60004820+xynydev@users.noreply.github.com> Date: Wed, 22 May 2024 15:37:36 +0000 Subject: [PATCH 10/19] chore: replace image name env var with github.event.repository.name Co-authored-by: Manuel Schmid <9307310+mashb1t@users.noreply.github.com> --- .github/workflows/build_container.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_container.yml b/.github/workflows/build_container.yml index 6d81fb5b..2201640b 100644 --- a/.github/workflows/build_container.yml +++ b/.github/workflows/build_container.yml @@ -32,7 +32,7 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} + images: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }} tags: | type=ref,event=branch type=ref,event=pr From 40711b7ac9e4da2256c707485b02eff1b8936c89 Mon Sep 17 00:00:00 2001 From: xyny <60004820+xynydev@users.noreply.github.com> Date: Wed, 22 May 2024 15:38:02 +0000 Subject: [PATCH 11/19] chore: replace image name env var with github.event.repository.name (pt2) Co-authored-by: Manuel Schmid <9307310+mashb1t@users.noreply.github.com> --- .github/workflows/build_container.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build_container.yml b/.github/workflows/build_container.yml index 2201640b..6bcd64d7 100644 --- a/.github/workflows/build_container.yml +++ b/.github/workflows/build_container.yml @@ -6,8 +6,6 @@ on: - main pull_request: -env: - IMAGE_NAME: fooocus jobs: build-and-push-image: From a80834f3b51744b57c64932e2703ad18b2345aaf Mon Sep 17 00:00:00 2001 From: xyny <60004820+xynydev@users.noreply.github.com> Date: Wed, 22 May 2024 15:38:34 +0000 Subject: [PATCH 12/19] fix: switch to semver versioning Co-authored-by: Manuel Schmid <9307310+mashb1t@users.noreply.github.com> --- .github/workflows/build_container.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_container.yml b/.github/workflows/build_container.yml index 6bcd64d7..bb68dc4e 100644 --- a/.github/workflows/build_container.yml +++ b/.github/workflows/build_container.yml @@ -32,9 +32,9 @@ jobs: with: images: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }} tags: | - type=ref,event=branch - type=ref,event=pr - type=sha + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} - name: Build and push Docker image uses: docker/build-push-action@v5 From d4e373b83c05f16728106fcaf685c3b87476bdbb Mon Sep 17 00:00:00 2001 From: xyny <60004820+xynydev@users.noreply.github.com> Date: Wed, 22 May 2024 15:38:50 +0000 Subject: [PATCH 13/19] fix: build only on versioned tags Co-authored-by: Manuel Schmid <9307310+mashb1t@users.noreply.github.com> --- .github/workflows/build_container.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_container.yml b/.github/workflows/build_container.yml index bb68dc4e..27e847fc 100644 --- a/.github/workflows/build_container.yml +++ b/.github/workflows/build_container.yml @@ -2,9 +2,8 @@ name: Create and publish a container image on: push: - branches: - - main - pull_request: + tags: + - 'v*' jobs: From ca561944d5cd8ba73506ced91182f44966d53993 Mon Sep 17 00:00:00 2001 From: xyny <60004820+xynydev@users.noreply.github.com> Date: Wed, 22 May 2024 15:39:34 +0000 Subject: [PATCH 14/19] fix: don't update in entrypoint Co-authored-by: Manuel Schmid <9307310+mashb1t@users.noreply.github.com> --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 346ad675..d0dba09c 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -30,4 +30,4 @@ mklink outputs import outputs # Start application -python entry_with_update.py $* +python launch.py $* From 299ba4d2a22b8839bb227d751da2fa3a747b2dc6 Mon Sep 17 00:00:00 2001 From: xyny <60004820+xynydev@users.noreply.github.com> Date: Wed, 22 May 2024 15:39:55 +0000 Subject: [PATCH 15/19] fix: remove dash in "docker-compose" Co-authored-by: Manuel Schmid <9307310+mashb1t@users.noreply.github.com> --- docker.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker.md b/docker.md index 137f67b9..6dd58c20 100644 --- a/docker.md +++ b/docker.md @@ -79,7 +79,7 @@ podman build . -t fooocus ## Details -### Update the container manually (`docker-compose`) +### Update the container manually (`docker compose`) When you are using `docker compose up` continuously, the container is not updated to the latest version of Fooocus automatically. Run `git pull` before executing `docker compose build --no-cache` to build an image with the latest Fooocus version. From 7f6dfe25a5b1312e6ed41e7e6866344505971c69 Mon Sep 17 00:00:00 2001 From: Manuel Schmid Date: Wed, 22 May 2024 23:50:27 +0200 Subject: [PATCH 16/19] feat: sync pytorch for docker with version used in prepare_environment --- docker.md | 2 +- requirements_docker.txt | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/docker.md b/docker.md index 6dd58c20..0e1bc2a1 100644 --- a/docker.md +++ b/docker.md @@ -1,6 +1,6 @@ # Fooocus on Docker -The docker image is based on NVIDIA CUDA 12.4 and PyTorch 2.0, see [Dockerfile](Dockerfile) and [requirements_docker.txt](requirements_docker.txt) for details. +The docker image is based on NVIDIA CUDA 12.4 and PyTorch 2.1, see [Dockerfile](Dockerfile) and [requirements_docker.txt](requirements_docker.txt) for details. ## Requirements diff --git a/requirements_docker.txt b/requirements_docker.txt index 3cf4aa89..21883adf 100644 --- a/requirements_docker.txt +++ b/requirements_docker.txt @@ -1,5 +1,2 @@ -torch==2.0.1 -torchvision==0.15.2 -torchaudio==2.0.2 -torchtext==0.15.2 -torchdata==0.6.1 +torch==2.1.0 +torchvision==0.16.0 From 260193e36febf63aef974aa5e23cd66e45166587 Mon Sep 17 00:00:00 2001 From: Manuel Schmid Date: Wed, 22 May 2024 23:51:19 +0200 Subject: [PATCH 17/19] feat: update cuda to 12.4.1 --- Dockerfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 045107d1..b5fa1bcc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM nvidia/cuda:12.4.0-base-ubuntu22.04 +FROM nvidia/cuda:12.4.1-base-ubuntu22.04 ENV DEBIAN_FRONTEND noninteractive ENV CMDARGS --listen @@ -14,9 +14,6 @@ RUN pip install --no-cache-dir xformers==0.0.23 --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 -# fix Error: libcuda.so: cannot open shared object file: -RUN ln -s /usr/lib64/libcuda.so.550.67 /usr/lib64/libcuda.so - RUN adduser --disabled-password --gecos '' user && \ mkdir -p /content/app /content/data From 1b1c3aabc1dd5b3259b4bbefbc3575c12a2e510a Mon Sep 17 00:00:00 2001 From: Manuel Schmid Date: Wed, 22 May 2024 23:52:05 +0200 Subject: [PATCH 18/19] fix: correctly clone checked out version in builds, not always main --- .dockerignore | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++- Dockerfile | 2 +- 2 files changed, 55 insertions(+), 2 deletions(-) diff --git a/.dockerignore b/.dockerignore index 485dee64..d1eab807 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1 +1,54 @@ -.idea +__pycache__ +*.ckpt +*.safetensors +*.pth +*.pt +*.bin +*.patch +*.backup +*.corrupted +*.partial +*.onnx +sorted_styles.json +/input +/cache +/language/default.json +/test_imgs +config.txt +config_modification_tutorial.txt +user_path_config.txt +user_path_config-deprecated.txt +/modules/*.png +/repositories +/fooocus_env +/venv +/tmp +/ui-config.json +/outputs +/config.json +/log +/webui.settings.bat +/embeddings +/styles.csv +/params.txt +/styles.csv.bak +/webui-user.bat +/webui-user.sh +/interrogate +/user.css +/.idea +/notification.ogg +/notification.mp3 +/SwinIR +/textual_inversion +.vscode +/extensions +/test/stdout.txt +/test/stderr.txt +/cache.json* +/config_states/ +/node_modules +/package-lock.json +/.coverage* +/auth.json +.DS_Store \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index b5fa1bcc..1172c795 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ RUN chown -R user:user /content WORKDIR /content USER user -RUN git clone https://github.com/lllyasviel/Fooocus /content/app +COPY . /content/app RUN mv /content/app/models /content/app/models.org CMD [ "sh", "-c", "/content/entrypoint.sh ${CMDARGS}" ] From 1ab1b52cae76522cff611254b88e7decc13f71fe Mon Sep 17 00:00:00 2001 From: Manuel Schmid Date: Wed, 22 May 2024 23:52:49 +0200 Subject: [PATCH 19/19] refactor: remove irrelevant version in docker-compose.yml --- .github/workflows/build_container.yml | 1 - docker-compose.yml | 2 -- 2 files changed, 3 deletions(-) diff --git a/.github/workflows/build_container.yml b/.github/workflows/build_container.yml index 27e847fc..1e118a1f 100644 --- a/.github/workflows/build_container.yml +++ b/.github/workflows/build_container.yml @@ -5,7 +5,6 @@ on: tags: - 'v*' - jobs: build-and-push-image: runs-on: ubuntu-latest diff --git a/docker-compose.yml b/docker-compose.yml index a573a915..f724964d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: '3.9' - volumes: fooocus-data: