From 8fa1b8b0f1d5ef815223a20cc2d6db9fc318a855 Mon Sep 17 00:00:00 2001 From: Rob Ballantyne Date: Fri, 10 Nov 2023 14:34:40 +0000 Subject: [PATCH] Add copy overlay for easily building serverless workers [skip ci] --- .gitignore | 2 +- build/COPY_ROOT_EXTRA/opt/serverless/handlers/.gitkeep | 0 build/COPY_ROOT_EXTRA/opt/serverless/workflows/.gitkeep | 0 build/Dockerfile | 3 +++ 4 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 build/COPY_ROOT_EXTRA/opt/serverless/handlers/.gitkeep create mode 100644 build/COPY_ROOT_EXTRA/opt/serverless/workflows/.gitkeep diff --git a/.gitignore b/.gitignore index 95940164..dd7bf0a2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ workspace -build/COPY_ROOT_EXTRA/opt/model_repository/ +build/COPY_ROOT_EXTRA/ config/authorized_keys config/rclone tpdocs/ diff --git a/build/COPY_ROOT_EXTRA/opt/serverless/handlers/.gitkeep b/build/COPY_ROOT_EXTRA/opt/serverless/handlers/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/build/COPY_ROOT_EXTRA/opt/serverless/workflows/.gitkeep b/build/COPY_ROOT_EXTRA/opt/serverless/workflows/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/build/Dockerfile b/build/Dockerfile index dcb411f5..08d89f72 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -24,5 +24,8 @@ ENV OPT_SYNC=ComfyUI:$OPT_SYNC ENV MAMBA_DEFAULT_ENV=comfyui ENV MAMBA_DEFAULT_RUN="micromamba run -n $MAMBA_DEFAULT_ENV" +# Copy overrides and models into a final layer for fast rebuilds +COPY ./COPY_ROOT_EXTRA/ / + # Keep init.sh as-is and place additional logic in /opt/ai-dock/bin/preflight.sh CMD ["init.sh"]