| ARG RELEASE |
| ARG LAUNCHPAD_BUILD_ARCH |
| LABEL org.opencontainers.image.ref.name=ubuntu |
| LABEL org.opencontainers.image.version=22.04 |
| ADD file:63d5ab3ef0aab308c0e71cb67292c5467f60deafa9b0418cbb220affcd078444 in / |
| CMD ["/bin/bash"] |
| ENV NVARCH=x86_64 |
| ENV NVIDIA_REQUIRE_CUDA=cuda>=12.2 brand=tesla,driver>=470,driver<471 brand=unknown,driver>=470,driver<471 brand=nvidia,driver>=470,driver<471 brand=nvidiartx,driver>=470,driver<471 brand=geforce,driver>=470,driver<471 brand=geforcertx,driver>=470,driver<471 brand=quadro,driver>=470,driver<471 brand=quadrortx,driver>=470,driver<471 brand=titan,driver>=470,driver<471 brand=titanrtx,driver>=470,driver<471 brand=tesla,driver>=525,driver<526 brand=unknown,driver>=525,driver<526 brand=nvidia,driver>=525,driver<526 brand=nvidiartx,driver>=525,driver<526 brand=geforce,driver>=525,driver<526 brand=geforcertx,driver>=525,driver<526 brand=quadro,driver>=525,driver<526 brand=quadrortx,driver>=525,driver<526 brand=titan,driver>=525,driver<526 brand=titanrtx,driver>=525,driver<526 |
| ENV NV_CUDA_CUDART_VERSION=12.2.140-1 |
| ENV NV_CUDA_COMPAT_PACKAGE=cuda-compat-12-2 |
| ARG TARGETARCH |
| LABEL maintainer=NVIDIA CORPORATION <cudatools@nvidia.com> |
| RUN |1 TARGETARCH=amd64 /bin/sh -c apt-get update && apt-get install -y --no-install-recommends gnupg2 curl ca-certificates && curl -fsSLO https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/${NVARCH}/cuda-keyring_1.0-1_all.deb && dpkg -i cuda-keyring_1.0-1_all.deb && apt-get purge --autoremove -y curl && rm -rf /var/lib/apt/lists/* # buildkit |
| ENV CUDA_VERSION=12.2.2 |
| RUN |1 TARGETARCH=amd64 /bin/sh -c apt-get update && apt-get install -y --no-install-recommends cuda-cudart-12-2=${NV_CUDA_CUDART_VERSION} ${NV_CUDA_COMPAT_PACKAGE} && rm -rf /var/lib/apt/lists/* # buildkit |
| RUN |1 TARGETARCH=amd64 /bin/sh -c echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf && echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf # buildkit |
| ENV PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
| ENV LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64 |
| COPY NGC-DL-CONTAINER-LICENSE / # buildkit |
| ENV NVIDIA_VISIBLE_DEVICES=all |
| ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility |
| RUN /bin/sh -c apt-get update -y && apt-get install -y python3-pip python3-dev git nano less build-essential # Install dependencies for building extensions # buildkit |
| ENV PUID=1099 |
| ENV PGID=2000 |
| ENV PYTHONDONTWRITEBYTECODE=1 |
| ENV PYTHONUNBUFFERED=1 |
| ARG FLUXGYM_SRC=--branch fluxgym-extended https://github.com/aguindehi/fluxgym |
| ARG KOHYASS_SRC=--branch sd3 https://github.com/kohya-ss/sd-scripts |
| ARG IMAGE_VER |
| ARG IMAGE_APP |
| RUN |4 FLUXGYM_SRC=--branch fluxgym-extended https://github.com/aguindehi/fluxgym KOHYASS_SRC=--branch sd3 https://github.com/kohya-ss/sd-scripts IMAGE_VER=0.2.3 IMAGE_APP=aifo-fluxgym /bin/sh -c echo "RELEASE_TEAM=AIFO" > /etc/aifo-release && echo "RELEASE_VER=${IMAGE_VER:-unknown}" >> /etc/aifo-release && echo "RELEASE_IMG=${IMAGE_APP:-fluxgym}" >> /etc/aifo-release # buildkit |
| RUN |4 FLUXGYM_SRC=--branch fluxgym-extended https://github.com/aguindehi/fluxgym KOHYASS_SRC=--branch sd3 https://github.com/kohya-ss/sd-scripts IMAGE_VER=0.2.3 IMAGE_APP=aifo-fluxgym /bin/sh -c groupadd -g "${PGID}" appuser # buildkit |
| RUN |4 FLUXGYM_SRC=--branch fluxgym-extended https://github.com/aguindehi/fluxgym KOHYASS_SRC=--branch sd3 https://github.com/kohya-ss/sd-scripts IMAGE_VER=0.2.3 IMAGE_APP=aifo-fluxgym /bin/sh -c useradd -m -s /bin/sh -u "${PUID}" -g "${PGID}" appuser # buildkit |
| WORKDIR /app |
| RUN |4 FLUXGYM_SRC=--branch fluxgym-extended https://github.com/aguindehi/fluxgym KOHYASS_SRC=--branch sd3 https://github.com/kohya-ss/sd-scripts IMAGE_VER=0.2.3 IMAGE_APP=aifo-fluxgym /bin/sh -c git clone ${FLUXGYM_SRC} . && git clone ${KOHYASS_SRC} # buildkit |
| RUN |4 FLUXGYM_SRC=--branch fluxgym-extended https://github.com/aguindehi/fluxgym KOHYASS_SRC=--branch sd3 https://github.com/kohya-ss/sd-scripts IMAGE_VER=0.2.3 IMAGE_APP=aifo-fluxgym /bin/sh -c cd sd-scripts && pip install --no-cache-dir -r ./requirements.txt && cd .. && pip install --no-cache-dir -r ./requirements.txt # buildkit |
| RUN |4 FLUXGYM_SRC=--branch fluxgym-extended https://github.com/aguindehi/fluxgym KOHYASS_SRC=--branch sd3 https://github.com/kohya-ss/sd-scripts IMAGE_VER=0.2.3 IMAGE_APP=aifo-fluxgym /bin/sh -c pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu122/torch_stable.html # buildkit |
| RUN |4 FLUXGYM_SRC=--branch fluxgym-extended https://github.com/aguindehi/fluxgym KOHYASS_SRC=--branch sd3 https://github.com/kohya-ss/sd-scripts IMAGE_VER=0.2.3 IMAGE_APP=aifo-fluxgym /bin/sh -c apt-get purge --autoremove -y git && rm -rf /var/lib/apt/lists/* # buildkit |
| RUN |4 FLUXGYM_SRC=--branch fluxgym-extended https://github.com/aguindehi/fluxgym KOHYASS_SRC=--branch sd3 https://github.com/kohya-ss/sd-scripts IMAGE_VER=0.2.3 IMAGE_APP=aifo-fluxgym /bin/sh -c chown -R appuser:appuser /app # buildkit |
| USER appuser |
| EXPOSE map[7860/tcp:{}] |
| ENV GRADIO_SERVER_NAME=0.0.0.0 |
| WORKDIR /app |
| CMD ["python3" "-u" "./app.py"] |
| USER root |
| /bin/sh -c apt-get update && apt-get install -y curl bash unzip jq && rm -rf /var/lib/apt/lists/* |
| /bin/sh -c curl -O https://dl.min.io/client/mc/release/linux-amd64/mc && chmod +x mc && mv mc /usr/local/bin/mc |
| /bin/sh -c pip install wd-llm-caption |
| /bin/sh -c apt-get update && apt-get install -y git |
| /bin/sh -c git clone https://github.com/fireicewolf/wd-llm-caption-cli.git && cd wd-llm-caption-cli && pip install -U -r requirements_onnx_cu12x.txt |
| /bin/sh -c mkdir -p /app |
| WORKDIR /app |
| COPY file:b01453b691e4f55bf8c5155a160d41642cbebe4826123ca2f13413105ee524bd in /app/run.sh |
| /bin/sh -c chmod +x /app/run.sh |
| ENTRYPOINT ["/app/run.sh"] |