kohya_ss-docker
kohya_ss-docker copied to clipboard
The builded image seems to be very hudge
Hello! Thanks for sharing this repo! I have a question. is it normal to have a very big image for the build? There is a loads of layers for the image with some very huge, the total size of the image for me is 18 Gb.
I'm not really familiar with the kohya app and python, i have no idea if it's a normal size or not for something like that.
i join the export for each layer. There is solution to reduce the size?
1 | 74.8 MB | ADD file:209589a8bdb5a3788ee42ecdbccbbb561835dab96b0d8286bb5a2229d2f41be7 in / |
---|---|---|
2 | 0 B | CMD ["bash"] |
3 | 0 B | ENV PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
4 | 0 B | ENV LANG=C.UTF-8 |
5 | 9.2 MB | RUN RUN set -eux; apt-get update; apt-get install -y --no-install-recommends ca-certificates netbase tzdata ; rm -rf ... |
6 | 0 B | ENV GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D |
7 | 0 B | ENV PYTHON_VERSION=3.10.12 |
8 | 50.9 MB | RUN RUN set -eux; savedAptMark="$(apt-mark showmanual)"; apt-get update; apt-get install -y --no-install-recommends dpkg-... |
9 | 32 B | RUN RUN set -eux; for src in idle3 pydoc3 python3 python3-config; do dst="$(echo "$src" | tr -d 3)"; [ -s "/usr/local/bin/... |
10 | 0 B | ENV PYTHON_PIP_VERSION=23.0.1 |
11 | 0 B | ENV PYTHON_SETUPTOOLS_VERSION=65.5.1 |
12 | 0 B | ENV PYTHON_GET_PIP_URL=https://github.com/pypa/get-pip/raw/0d8570dc44796f4369b652222cf176b3db6ac70e/public/get-pip.py |
13 | 0 B | ENV PYTHON_GET_PIP_SHA256=96461deced5c2a487ddc65207ec5a9cffeca0d34e7af7ea1afc470ff0d746207 |
14 | 12.2 MB | RUN RUN set -eux; savedAptMark="$(apt-mark showmanual)"; apt-get update; apt-get install -y --no-install-recommends wget; ... |
15 | 0 B | CMD ["python3"] |
16 | 0 B | SHELL [/bin/bash -ceuxo pipefail] |
17 | 0 B | ARG TORCH_CUDA_ARCH_LIST |
18 | 0 B | ARG CUDNN_VERSION |
19 | 0 B | ARG NVCC_FLAGS |
20 | 0 B | ARG pyver |
21 | 0 B | ARG PIP_REPOSITORY |
22 | 0 B | ARG CUDA_KEYRING |
23 | 0 B | ENV NVCC_FLAGS=--use_fast_math |
24 | 0 B | ENV TORCH_CUDA_ARCH_LIST=7.5+PTX |
25 | 0 B | ENV DEBIAN_FRONTEND=noninteractive |
26 | 0 B | ENV PIP_PREFER_BINARY=1 |
27 | 0 B | ENV PIP_REPOSITORY="https://download.pytorch.org/whl/cu118" |
28 | 0 B | ENV PIP_NO_CACHE_DIR=1 |
29 | 0 B | ENV NVIDIA_VISIBLE_DEVICES=all |
30 | 0 B | ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility |
31 | 343.4 MB | RUN |6 TORCH_CUDA_ARCH_LIST=7.5+PTX CUDNN_VERSION="8.6.0.163" NVCC_FLAGS=--use_fast_math pyver=3.10 PIP_REPOSITORY="https://dow... |
32 | 67.1 MB | RUN |6 TORCH_CUDA_ARCH_LIST=7.5+PTX CUDNN_VERSION="8.6.0.163" NVCC_FLAGS=--use_fast_math pyver=3.10 PIP_REPOSITORY="https://dow... |
33 | 351 kB | RUN |6 TORCH_CUDA_ARCH_LIST=7.5+PTX CUDNN_VERSION="8.6.0.163" NVCC_FLAGS=--use_fast_math pyver=3.10 PIP_REPOSITORY="https://dow... |
34 | 1.9 MB | RUN |6 TORCH_CUDA_ARCH_LIST=7.5+PTX CUDNN_VERSION="8.6.0.163" NVCC_FLAGS=--use_fast_math pyver=3.10 PIP_REPOSITORY="https://dow... |
35 | 293 B | COPY ./scripts/install-container-dep.sh /docker/ # buildkit |
36 | 3.1 GB | RUN |6 TORCH_CUDA_ARCH_LIST=7.5+PTX CUDNN_VERSION="8.6.0.163" NVCC_FLAGS=--use_fast_math pyver=3.10 PIP_REPOSITORY="https://dow... |
37 | 0 B | SHELL [/bin/bash -ceuxo pipefail] |
38 | 0 B | ARG TORCH_COMMAND |
39 | 0 B | ARG XFORMERS_COMMAND |
40 | 0 B | ARG TENSORFLOW_COMMAND |
41 | 0 B | ARG DS_BUILD_OPS |
42 | 0 B | ARG pyver |
43 | 0 B | ARG DEEPSPEED |
44 | 0 B | ARG DEEPSPEED_VERSION |
45 | 0 B | ARG TORCH_CUDA_ARCH_LIST |
46 | 0 B | ARG TRITON_VERSION |
47 | 0 B | ARG JAX |
48 | 0 B | ARG TPU |
49 | 0 B | ENV pyver=3.10 |
50 | 0 B | ENV ROOT=/koyah_ss |
51 | 0 B | ENV CUDART_PATH=/venv/lib/python3.10/site-packages/nvidia/cuda_runtime |
52 | 0 B | ENV CUDNN_PATH=/venv/lib/python3.10/site-packages/nvidia/cudnn |
53 | 0 B | ENV TENSORRT_PATH=/venv/lib/python3.10/site-packages/tensorrt |
54 | 0 B | ENV LD_LIBRARY_PATH=/venv/lib/python3.10/site-packages/tensorrt:/venv/lib/python3.10/site-packages/nvidia/cudnn/lib:/venv/lib/p... |
55 | 7.8 MB | RUN |11 TORCH_COMMAND=/bin/bash XFORMERS_COMMAND=/bin/bash TENSORFLOW_COMMAND=/bin/bash DS_BUILD_OPS=1 pyver=3.10 DEEPSPEED=Fal... |
56 | 0 B | WORKDIR /koyah_ss |
57 | 3 MB | RUN |11 TORCH_COMMAND=/bin/bash XFORMERS_COMMAND=/bin/bash TENSORFLOW_COMMAND=/bin/bash DS_BUILD_OPS=1 pyver=3.10 DEEPSPEED=Fal... |
58 | 0 B | RUN |11 TORCH_COMMAND=/bin/bash XFORMERS_COMMAND=/bin/bash TENSORFLOW_COMMAND=/bin/bash DS_BUILD_OPS=1 pyver=3.10 DEEPSPEED=Fal... |
59 | 0 B | RUN |11 TORCH_COMMAND=/bin/bash XFORMERS_COMMAND=/bin/bash TENSORFLOW_COMMAND=/bin/bash DS_BUILD_OPS=1 pyver=3.10 DEEPSPEED=Fal... |
60 | 0 B | RUN |11 TORCH_COMMAND=/bin/bash XFORMERS_COMMAND=/bin/bash TENSORFLOW_COMMAND=/bin/bash DS_BUILD_OPS=1 pyver=3.10 DEEPSPEED=Fal... |
61 | 111 B | RUN |11 TORCH_COMMAND=/bin/bash XFORMERS_COMMAND=/bin/bash TENSORFLOW_COMMAND=/bin/bash DS_BUILD_OPS=1 pyver=3.10 DEEPSPEED=Fal... |
62 | 0 B | ENV TPU_LIBRARY_PATH=/venv/lib/python3.10/site-packages/libtpu/ |
63 | 0 B | RUN |11 TORCH_COMMAND=/bin/bash XFORMERS_COMMAND=/bin/bash TENSORFLOW_COMMAND=/bin/bash DS_BUILD_OPS=1 pyver=3.10 DEEPSPEED=Fal... |
64 | 0 B | ARG CUDA_VERSION |
65 | 0 B | ARG CUDA_DRIVERS |
66 | 0 B | ARG pyver |
67 | 0 B | ENV CUDA_HOME=/usr/local/cuda |
68 | 0 B | ENV PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/cuda/bin |
69 | 0 B | ENV LD_LIBRARY_PATH=/usr/local/cuda/lib:/venv/lib/python3.10/site-packages/tensorrt:/venv/lib/python3.10/site-packages/nvidia/c... |
70 | 0 B | RUN |3 CUDA_VERSION=cuda-11-8 CUDA_DRIVERS=cuda-drivers-535 pyver=3.10 /bin/bash -ceuxo pipefail # Hotfix for libnvinfer7 ln -s... |
71 | 8.9 GB | RUN |3 CUDA_VERSION=cuda-11-8 CUDA_DRIVERS=cuda-drivers-535 pyver=3.10 /bin/bash -ceuxo pipefail # cuda driver update apt-get u... |
72 | 0 B | WORKDIR /koyah_ss |
73 | 5.3 GB | RUN /bin/bash -ceuxo pipefail # installing kohya trainer scripts git pull --rebase /bin/bash /docker/install-container-dep.sh -... |
74 | 3.3 kB | COPY ./scripts/*.sh /docker/ # buildkit |
75 | 3 kB | RUN /bin/bash -ceuxo pipefail chmod +x /docker/{run,mount,debug}.sh # buildkit |
76 | 0 B | EXPOSE map[7680/tcp:{}] |
77 | 0 B | EXPOSE map[6006/tcp:{}] |
78 | 0 B | ENTRYPOINT ["/bin/bash" "-ceuxo" "pipefail" "$RUNNER $RUN_ARGS"] |