Skip to content

Commit

Permalink
artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
kebe7jun committed Oct 8, 2023
1 parent 2560f86 commit 34b6e72
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 8 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ jobs:
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# - name: Login to DockerHub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login Github Container registry
uses: docker/login-action@v2
with:
Expand All @@ -35,6 +30,7 @@ jobs:
ghcr.io/${{ github.repository_owner }}/stable-diffusion-webui
tags: |
latest
${{ github.run_number }}
- name: Build
uses: docker/build-push-action@v4
Expand All @@ -45,3 +41,14 @@ jobs:
provenance: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
helm-artifact:
runs-on: ubuntu-latest
needs:
- docker-build
steps:
- name: package helm
run: |-
tar -zcvf stable-diffusion-${{ github.run_number }}.tgz stable-diffusion
- uses: actions/upload-artifact@v3
with:
path: stable-diffusion-${{ github.run_number }}.tgz
13 changes: 13 additions & 0 deletions stable-diffusion/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Stable Diffusion

Stable Diffusion 是 HuggingFace 上著名英文文生图 Latent Diffusion 模型,可以根据任意的英文文本信息来生成拟真图片。

通过此应用(Helm)包部署,可以在集群中一键部署 Stable Diffusion 模型,支持 CPU/GPU 模式。

## 重要参数说明

| 参数名称 | 说明 | 默认值 |
| --- | --- | --- |
| deviceMode | `cpu` 或者 `gpu`,如果集群中无 GPU 设备,可设置成 `cpu`,将使用 cpu 进行计算。 | `gpu` |
| image.repository | 镜像地址,默认从 ghcr.io 拉取,如果速度慢可以尝试改为 `ghcr.m.daocloud.io/kebe7jun/stable-diffusion-webui` | `ghcr.io/kebe7jun/stable-diffusion-webui` |
| service.type | 服务暴露类型 | `ClusterIP` |
1 change: 1 addition & 0 deletions stable-diffusion/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Selector labels
{{- define "stable-diffusion.selectorLabels" -}}
app.kubernetes.io/name: {{ include "stable-diffusion.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app: {{ include "stable-diffusion.name" . }}
{{- end }}

{{/*
Expand Down
2 changes: 0 additions & 2 deletions stable-diffusion/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ metadata:
labels:
{{- include "stable-diffusion.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "stable-diffusion.selectorLabels" . | nindent 6 }}
Expand Down
2 changes: 1 addition & 1 deletion stable-diffusion/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ resources:
cpu: '8'
memory: 8Gi
requests:
cpu: '1'
cpu: '2'
memory: 2Gi

nodeSelector: {}
Expand Down

0 comments on commit 34b6e72

Please sign in to comment.