Commit Graph

49 Commits (master)

Author SHA1 Message Date
CHEN, CHUN cff20de128
build(docker): upgrade to CUDA 12.8 and Debian 12
- Update base image from Debian 11 (bullseye) to Debian 12 (bookworm)
- Upgrade CUDA version from 12.4 to 12.8
- Update PyTorch from version 2.5.1 to 2.7.0 with CUDA 12.8 support
- Change triton dependency from exact version 3.1.0 to minimum version constraint

Signed-off-by: CHEN, CHUN <jim60105@gmail.com>
2025-05-27 00:19:05 +08:00
陳鈞 44cca1c367
build(docker): switch from pip to uv for package management (#3229)
- Upgrade base image from Python 3.10 to Python 3.11 slim on Debian Bullseye.
- Replace manual PyTorch and dependencies installation with uv environment management and installation.
- Add installation of large dependencies (torch, triton, tensorflow, onnxruntime-gpu) explicitly to optimize image layer caching.
- Switch from pip to uv for package management and dependency synchronization.
- Replace pillow with pillow-simd on amd64 architecture using uv-managed pip for performance improvements.
- Adjust environment variables to use the virtual environment under /venv instead of local user installs.
- Create /venv directory with appropriate permissions and copy the virtual environment from build stage.
- Modify CMD to add --noverify flag when launching kohya_gui.py.
- Remove requirements_linux_docker.txt file, consolidating dependency management into uv and pyproject.toml.

Signed-off-by: CHEN, CHUN <jim60105@gmail.com>
2025-05-23 20:34:27 -04:00
JoeYang1412 e69834cd6f
Update CUDA and PyTorch configuration in Dockerfile (#3195) 2025-05-02 20:21:51 -04:00
陳鈞 289431cb52
chore(docker): improve logging setup
- Implemented rich logging in Dockerfile and set FORCE_COLOR environment variable to true
- Set the COLUMNS environment variable to `100` in Dockerfile for wider output
- Replaced single quotes with double quotes for `device_ids` value in docker-compose.yaml

Signed-off-by: 陳鈞 <jim60105@gmail.com>
2024-04-26 01:09:41 +08:00
陳鈞 ca15158b37
Revert "chore(docker): add the `--do_not_use_shell` in Docker commands"
This reverts commit 1bd0465eecbcff4ec8cc86c9ae0a7dcfe27c7e52.

`shell=False` does not work in Linux when passing the command as a string with arguments.
https://github.com/bmaltais/kohya_ss/issues/2284#issuecomment-2065778659
2024-04-26 01:09:40 +08:00
陳鈞 b73fc92472
chore(docker): add the `--do_not_use_shell` in Docker commands
- Add the `--do_not_use_shell` option to the Python CMD in the Dockerfile.

Signed-off-by: 陳鈞 <jim60105@gmail.com>
2024-04-26 01:09:40 +08:00
陳鈞 ab37b4da0a
feat(docker): remove and standalone TensorBoard (TensorFlow) for docker
- The Dockerfile no longer installs TensorFlow, only PyTorch
- The TensorBoard exposure port has been removed from the Dockerfile
- A new tensorboard service has been added to the docker-compose.yaml file, utilizing the TensorFlow:latest-gpu image and exposing port 6006.
- The requirements_linux_docker.txt file has the tensorboard and tensorflow requirements commented out.

Signed-off-by: 陳鈞 <jim60105@gmail.com>
2024-04-26 01:09:36 +08:00
陳鈞 d504015c3a
chore(docker): Fix bitsandbytes can't find cuda (#2178)
* chore(docker): enhance build process with apt caching

- Cache `apt-get` update in Docker build to speed up subsequent builds
- Avoid cleaning `apt-get` cache and removing /var/lib/apt/lists/* after each install to take advantage of caching
- Add arguments for TARGETARCH and TARGETVARIANT
- Utilize cache mounting for pillow-simd installation in x86 platform
- Remove manual cleaning of `apt-get` and `/var/lib/apt/lists/*` after installing runtime dependencies

Signed-off-by: 陳鈞 <jim60105@gmail.com>

* chore(docker): Fix bitsandbytes can't find cuda

- Set work directory to /tmp
- Defined several environment variables for CUDA version 12.1.1
- Install the CUDA keyring
- Added a process for partial installation of CUDA to minimize Docker image size
- Added /usr/local/cuda/lib and /usr/local/cuda/lib64 to PATH and LD_LIBRARY_PATH environment variables

Signed-off-by: 陳鈞 <jim60105@gmail.com>

* chore(docker): add `--headless` in the Dockerfile

- Add `--headless` option to the execution command of `kohya_gui.py` in the Dockerfile

Signed-off-by: 陳鈞 <jim60105@gmail.com>

---------

Signed-off-by: 陳鈞 <jim60105@gmail.com>
2024-03-30 16:31:51 -04:00
陳鈞 58958d4637
chore(docker): adjust Dockerfile layers to improve build cache design
- Remove Docker LABEL related metadata and ARG for UID, VERSION, RELEASE from the beginning of the Dockerfile.
- Add NVIDIA environment settings to make visible devices and driver capabilities available.
- Add ARG UID back and modify user creation command accordingly.
- Make use of hard links (with `--link`) for license and code copy commands to optimize use of space.
- Reposition WORKDIR and ARG declarations for VERSION and RELEASE towards the end of the Dockerfile.
- Attach metadata labels like name, vendor, url, version, release, display name, summary, and description at the end of the Dockerfile, instead of the beginning.

Signed-off-by: 陳鈞 <jim60105@gmail.com>
2024-03-15 12:44:47 +08:00
bmaltais 3e023952df
Dev pure (#2039)
* Remove library folder, update setup_windows

* Cleanup sd-scripts files

* set sd-scripts release via file

* More cleanup

* Point to sd-scripts python files

* Fix blip captioning working directory

* Fix typo

* Fix issue with verify lora

* Improve git cloning of sd-scripts repo

* Integrate cloning in linux setup script

* Remove unnecessary folder

* Update linux setup

* Removing unnecessary code

* Fix validation issue under linux

* Update tensorboard version linux

* Updating linux requirements

* Update README

* Added submodule for sd-scripts

* Update for proper submodule handling

* Simplify submodule init

* Update comment

* Improve WSL2 LD_LIBRARY_PATH handling

* Update tensorboard handling of logging_dir

* chore(docker): update TensorFlow and TensorBoard versions

- Upgrade TensorFlow version in Dockerfile and requirements to 2.15.0.post1
- Update TensorBoard version in requirements to 2.15.2

Signed-off-by: 陳鈞 <jim60105@gmail.com>

* chore(docker): Add a mount for `sd-scripts` in the Dockerfile during pip install

- Add a mount step for `sd-scripts` in the Dockerfile during pip install.

Signed-off-by: 陳鈞 <jim60105@gmail.com>

* doc(docker): Update readme about docker

* Fix issue with TE LR

* Fix issue with TE LR

* Update sd-scripts to Feb 27 2024 commit

* Update version of bnb for windows

* Update windows setup

* Update windows setup

* Update bnb linux to match windows

* remove height:auto

* update UI

 * unify Quick Pick + custom model selection into gr.Dropdown()
 * add list_dirs(), list_files()
 * use gr.Accordion()
 * always show model + training image folder + output name + minimal default settings
 * do not show hidden files
 * clean up list_*()

* use PYTHONPATH env variable

* add "tool" classname to gr.Button() for sd-webui compatible

* update *_caption_gui.py using create_refresh_buttons()

* update Utilities->Group Images

* update Utilities->Convert model

* update dataset gui

* update Dreambooth/LoRA folders preparation

* update *lora*_gui UI using list_files(), create_refresh_button()

* more fixes for PYTHONPATH

* Minor edits to basic caption and common gui

* Optimising some code

* Fix path issue

* Fix issues with list_images_dir

* Update finetuning image folder label

* Minor updates to UI

---------

Signed-off-by: 陳鈞 <jim60105@gmail.com>
Co-authored-by: 陳鈞 <jim60105@gmail.com>
Co-authored-by: Won-Kyu Park <wkpark@gmail.com>
2024-03-09 09:30:20 -05:00
陳鈞 d7add285a5
chore(docker): Add label
Signed-off-by: 陳鈞 <jim60105@gmail.com>
2024-02-18 09:59:00 +08:00
陳鈞 543d12fcf5
chore(docker): fix dependencies for slim image
- Switch to a slim variant of the Python 3.10 Docker image for the build stage.
- Introduce a conditional installation of `pillow-simd` replacing `pillow`, specific to x86 architecture.
- Add required dependencies for `pillow-simd` installation, along with cleanup commands to remove unnecessary package lists after installation.
- Update runtime dependencies by adding `libtcl8.6` and `libtk8.6` to the final Docker image.

Signed-off-by: 陳鈞 <jim60105@gmail.com>
2024-02-18 09:59:00 +08:00
陳鈞 8330597e1a
chore(docker): Add EXPOSE ports and change final base image to python:3.10-slim
- Change the base image from `python:3.10` to `python:3.10-slim`
- Expose ports `7860` and `6006` in the Dockerfile

Signed-off-by: 陳鈞 <jim60105@gmail.com>
2024-02-18 09:59:00 +08:00
陳鈞 83bf2e0649
chore(docker): rewrite Dockerfile
Signed-off-by: 陳鈞 <jim60105@gmail.com>
2024-02-18 09:58:59 +08:00
Blanchon 9cdb6f03b8
Update Dockerfile
Mount user cache to improve build time
2023-11-30 15:32:23 +01:00
陳鈞 183bf1473a
feat: Let Tensorboard works in docker 2023-07-09 06:57:57 +08:00
Your Name 73d2f1489b Fix for docker 2023-06-24 07:58:53 -04:00
bmaltais 551eed76d2
Refactor setup (#1030)
* Refactor setup in setup folder

* More refactoring

* Remove need to run setup.sh as sudo

* Fix for unix undel python 3.8

* Create setup_common.py

* Fix windows setup

* Refining setup

---------

Co-authored-by: Your Name <you@example.com>
2023-06-21 15:09:18 -04:00
burdukow 2bcca37961 Docker working tkinter 2023-06-13 14:43:03 +05:00
Sergey Elpashev 33f05c70b0 Docker: added --headless option 2023-06-12 16:49:25 +03:00
bmaltais 797e2b4433 Update unix based system requirements file 2023-06-07 13:38:12 -04:00
Michael Nugent 26515d1a03 Set cuda version to 11.8 2023-06-06 01:09:44 -04:00
Michael Nugent 765a03ad8e Add chown -R appuser: /app to Dockerfile 2023-06-04 22:31:46 -04:00
Enes Sadık Özbek a3b129b0ad
Docker: fix xformers not working 2023-05-05 20:51:14 +03:00
Enes Sadık Özbek 71c16903b5
Docker: add cu118 extra index url 2023-05-05 19:04:36 +03:00
Enes Sadık Özbek bd31b4c0a8
Docker: add xformers 2023-05-05 18:48:01 +03:00
Enes Sadık Özbek dd1c3266d1
Docker: use --pre for torch 2.1.0 nightlies 2023-05-05 18:36:24 +03:00
Enes Sadık Özbek 308d1d5c4e
Docker: use no cache dir for xformers and pillow-simd 2023-05-05 17:56:05 +03:00
Enes Sadık Özbek cccd417ef7
Docker: fix Dockerfile syntax warning 2023-05-05 17:54:24 +03:00
Enes Sadık Özbek fefaa46a1c
Docker: compile xformers nightly 2023-05-05 17:52:12 +03:00
Enes Sadık Özbek 72d633b741
Docker: add missing xformers 2023-05-05 17:50:34 +03:00
Enes Sadık Özbek f114006974
Update Dockerfile 2023-05-05 17:37:29 +03:00
bmaltais ca83de2013 Merge branch 'master' into dev 2023-05-03 13:28:28 -04:00
Chirag Jain eb2ca440c9
Add `--no-cache-dir` to reduce image size 2023-05-03 11:21:46 +05:30
Enes Sadık Özbek f4a7104097
Docker: ignore built-in deps 2023-05-02 21:37:47 +03:00
Enes Sadık Özbek d15c8958fb
Docker: use python 3.8 packages for faster image build 2023-05-02 21:26:00 +03:00
Enes Sadık Özbek 880d8a73ac
Docker: remove useless steps 2023-05-02 20:25:33 +03:00
Enes Sadık Özbek 1f76494fc0
Install shipped torch 2023-05-02 20:22:55 +03:00
Enes Sadık Özbek c6e187456d
Docker: Fix not finding accelerate command 2023-05-02 18:38:50 +03:00
Enes Sadık Özbek 1f6bef63eb
Docker: Fix python-tk version 2023-05-02 17:58:03 +03:00
Enes Sadık Özbek 77f1e7485a
Docker: fix missing pip 2023-05-02 17:37:22 +03:00
Enes Sadık Özbek 2389dc32fc
Docker: use python 3.10 and remove venv 2023-05-02 17:23:53 +03:00
Enes Sadık Özbek cac5e12e49
Docker: use xformers 0.0.17 2023-05-01 19:47:37 +03:00
Enes Sadık Özbek 1daafcc91c
Docker: fix missing libnvinfer7 2023-05-01 18:40:21 +03:00
Enes Sadık Özbek 5f8aa9edfa
Docker: add related issue link to hotfix 2023-05-01 18:02:53 +03:00
Enes Sadık Özbek 57ea3ee598
Docker: comment out hugging face import 2023-05-01 18:02:33 +03:00
Enes Sadık Özbek c1216e8a35
Fix conflicting packages 2023-05-01 17:36:31 +03:00
Enes Sadık Özbek e4e61406a7
Docker: separate requirements.txt and depds update commands 2023-05-01 17:17:18 +03:00
Enes Sadık Özbek 82fce1166e
Add docker support 2023-05-01 16:59:44 +03:00