From 775dc5fd9dc6be9c9cc1c6d3922734b5fe3b5a15 Mon Sep 17 00:00:00 2001 From: zhang dragon <37896851+sky18Dragon@users.noreply.github.com> Date: Tue, 19 Sep 2023 10:59:34 +0800 Subject: [PATCH 1/2] Update Dockerfile --- src/code/images/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/code/images/Dockerfile b/src/code/images/Dockerfile index 0d86846..a3b3ce5 100644 --- a/src/code/images/Dockerfile +++ b/src/code/images/Dockerfile @@ -90,7 +90,7 @@ RUN --mount=type=cache,target=/var/cache/apt \ ENV ROOT=/stable-diffusion-webui -ENV SHA=v1.5.1 +ENV SHA=v1.6.0 RUN --mount=type=cache,target=/root/.cache/pip \ git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git /stable-diffusion-webui && \ cd stable-diffusion-webui && \ @@ -230,4 +230,4 @@ COPY --from=model-base-download /JapaneseDollLikeness.safetensors ${SD_BUILTIN}/ COPY --from=model-base-download /chilloutmix_NiPrunedFp16Fix.safetensors ${SD_BUILTIN}/models/Stable-diffusion/chilloutmix_NiPrunedFp16Fix.safetensors RUN sed -i ${SD_BUILTIN}/config.json -e 's@sd-v1-5-inpainting.ckpt \[c6bbc15e32\]@chilloutmix_NiPrunedFp16Fix.safetensors \[59ffe2243a\]@' -RUN sed -i ${SD_BUILTIN}/config.json -e 's@c6bbc15e3224e6973459ba78de4998b80b50112b0ae5b5c67113d56b4e366b19@59ffe2243a25c9fe137d590eb3c5c3d3273f1b4c86252da11bbdc9568773da0c@' \ No newline at end of file +RUN sed -i ${SD_BUILTIN}/config.json -e 's@c6bbc15e3224e6973459ba78de4998b80b50112b0ae5b5c67113d56b4e366b19@59ffe2243a25c9fe137d590eb3c5c3d3273f1b4c86252da11bbdc9568773da0c@' From 9fa0654d5efaf17ac78d0cf5a5631f75e441cd36 Mon Sep 17 00:00:00 2001 From: serverless-devs Date: Tue, 19 Sep 2023 11:09:00 +0800 Subject: [PATCH 2/2] create s.yaml content --- s.yaml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 s.yaml diff --git a/s.yaml b/s.yaml new file mode 100644 index 0000000..8a86bcb --- /dev/null +++ b/s.yaml @@ -0,0 +1,48 @@ +edition: 1.0.0 +name: my-framework-app +access: default +services: + framework: + component: fc + props: + region: cn-shenzhen + service: + name: serverless-devs-application + function: + name: fc-stable-diffuson-9tv6 + description: Initialize + runtime: custom + environmentVariables: + PATH: >- + /opt/python3.10/bin:/usr/local/bin/apache-maven/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/ruby/bin:/opt/bin:/code:/code/bin + PYTHONPATH: /opt/python:/code + LD_LIBRARY_PATH: >- + /code:/code/lib:/usr/local/lib:/opt/lib:/opt/php8.1/lib:/opt/php8.0/lib:/opt/php7.2/lib + layers: + - acs:fc:cn-shenzhen:official:layers/Python310/versions/2 + - >- + acs:fc:cn-shenzhen:official:layers/Python310-Package-Collection/versions/2 + - acs:fc:cn-shenzhen:official:layers/Python3-Flask2x/versions/2 + memorySize: 128 + cpu: 0.05 + timeout: 60 + codeUri: ./ + diskSize: 512 + caPort: 9000 + customRuntimeConfig: + command: + - python + args: + - app.py + triggers: + - name: httpTrigger + type: http + config: + authType: anonymous + methods: + - GET + - POST + - PUT + - DELETE + - HEAD + - PATCH