Stable-Diffusion-UI-Agones/agones/fleet_pvc.yaml (47 lines of code) (raw):

# Copyright 2020 Google LLC All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. apiVersion: "agones.dev/v1" kind: Fleet metadata: name: sd-agones-fleet spec: replicas: 1 template: spec: container: simple-game-server ports: - name: default container: simple-game-server containerPort: 7654 - name: sd container: stable-diffusion-webui containerPort: 7860 protocol: TCP template: spec: containers: - name: simple-game-server # image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.14 image: <REGION>-docker.pkg.dev/<PROJECT_ID>/<BUILD_REGIST>/sd-agones-sidecar:0.1 resources: requests: memory: "64Mi" cpu: "20m" limits: memory: "64Mi" cpu: "20m" - name: stable-diffusion-webui image: <REGION>-docker.pkg.dev/<PROJECT_ID>/<BUILD_REGIST>/sd-webui:0.1 command: ["/bin/sh", "start.sh"] # https://github.com/AUTOMATIC1111/stable-diffusion-webui/discussions/6722 env: - name: SAFETENSORS_FAST_GPU value: "1" - name: LD_PRELOAD value: "/usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4" volumeMounts: - name: stable-diffusion-storage mountPath: /sd_dir resources: limits: nvidia.com/gpu: "1" volumes: - name: stable-diffusion-storage persistentVolumeClaim: claimName: vol1