forked from bmaltais/kohya_ss
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
64 changed files
with
4,804 additions
and
851 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.cache/ | ||
cudnn_windows/ | ||
bitsandbytes_windows/ | ||
bitsandbytes_windows_deprecated/ | ||
dataset/ | ||
__pycache__/ | ||
venv/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,6 @@ gui-user.bat | |
gui-user.ps1 | ||
.vscode | ||
wandb | ||
setup.log | ||
setup.log | ||
logs | ||
SmilingWolf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
FROM nvcr.io/nvidia/pytorch:23.04-py3 as base | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV TZ=Europe/London | ||
|
||
RUN apt update && apt-get install -y software-properties-common | ||
RUN add-apt-repository ppa:deadsnakes/ppa && \ | ||
apt update && \ | ||
apt-get install -y git curl libgl1 libglib2.0-0 libgoogle-perftools-dev \ | ||
python3.10-dev python3.10-tk python3-html5lib python3-apt python3-pip python3.10-distutils && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Set python 3.10 as default | ||
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 3 && \ | ||
update-alternatives --config python3 | ||
|
||
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3 | ||
|
||
WORKDIR /app | ||
RUN python3 -m pip install wheel | ||
|
||
# Todo: Install torch 2.1.0 for cu121 support (only available as nightly as of writing) | ||
## RUN python3 -m pip install --pre torch ninja setuptools --extra-index-url https://download.pytorch.org/whl/nightly/cu121 | ||
|
||
# Todo: Install xformers nightly for Torch 2.1.0 support | ||
## RUN python3 -m pip install -v -U git+https://github.com/facebookresearch/xformers.git@main#egg=xformers | ||
|
||
# Install requirements | ||
COPY requirements.txt setup.py ./ | ||
RUN python3 -m pip install --use-pep517 -r requirements.txt xformers | ||
|
||
# Replace pillow with pillow-simd | ||
RUN python3 -m pip uninstall -y pillow && \ | ||
CC="cc -mavx2" python3 -m pip install -U --force-reinstall pillow-simd | ||
|
||
# Fix missing libnvinfer7 | ||
USER root | ||
RUN ln -s /usr/lib/x86_64-linux-gnu/libnvinfer.so /usr/lib/x86_64-linux-gnu/libnvinfer.so.7 && \ | ||
ln -s /usr/lib/x86_64-linux-gnu/libnvinfer_plugin.so /usr/lib/x86_64-linux-gnu/libnvinfer_plugin.so.7 | ||
|
||
RUN useradd -m -s /bin/bash appuser | ||
USER appuser | ||
COPY --chown=appuser . . | ||
|
||
STOPSIGNAL SIGINT | ||
ENV LD_PRELOAD=libtcmalloc.so | ||
ENV PATH="$PATH:/home/appuser/.local/bin" | ||
CMD python3 "./kohya_gui.py" ${CLI_ARGS} --listen 0.0.0.0 --server_port 7860 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
version: "3.8" | ||
services: | ||
kohya-ss-gui: | ||
container_name: kohya-ss-gui | ||
image: kohya-ss-gui:latest | ||
build: | ||
context: . | ||
ports: | ||
- 127.0.0.1:7860:7860 | ||
tty: true | ||
ipc: host | ||
environment: | ||
CLI_ARGS: "" | ||
SAFETENSORS_FAST_GPU: 1 | ||
tmpfs: | ||
- /tmp | ||
volumes: | ||
- ./dataset:/dataset | ||
- ./.cache/user:/home/appuser/.cache | ||
- ./.cache/triton:/home/appuser/.triton | ||
- ./.cache/config:/app/appuser/.config | ||
- ./.cache/nv:/home/appuser/.nv | ||
- ./.cache/keras:/home/appuser/.keras | ||
deploy: | ||
resources: | ||
reservations: | ||
devices: | ||
- driver: nvidia | ||
device_ids: ['0'] | ||
capabilities: [gpu] |
File renamed without changes.
File renamed without changes.
Oops, something went wrong.