-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update Dockerfile according to comments and move to separated folder
Co-authored-by: Lukas <[email protected]> Signed-off-by: Peter Pan <[email protected]>
- Loading branch information
1 parent
5070021
commit 50a6693
Showing
9 changed files
with
136 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,9 @@ | ||
models | ||
models/ | ||
.venv | ||
.che__/ | ||
*.log | ||
*.git | ||
*.gitignore | ||
docker | ||
models/* | ||
embeddings/* | ||
extensions/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
services: | ||
webui: | ||
build: . | ||
volumes: | ||
- type: bind | ||
source: ./models | ||
target: /webui/models | ||
- type: bind | ||
source: ./outputs | ||
target: /webui/outputs | ||
- type: bind | ||
source: ./extensions | ||
target: /webui/extensions | ||
- type: bind | ||
source: ./embeddings | ||
target: /webui/embeddings | ||
- type: bind | ||
source: ./configs | ||
target: /webui/configs | ||
ports: | ||
- 7860:7860 | ||
deploy: | ||
resources: | ||
reservations: | ||
devices: | ||
- driver: nvidia | ||
count: all | ||
capabilities: [gpu] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: stable-diffusion-webui | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: stable-diffusion-webui | ||
template: | ||
metadata: | ||
labels: | ||
app: stable-diffusion-webui | ||
spec: | ||
containers: | ||
- name: stable-diffusion-webui | ||
image: $(YOUR-IMAGE-NAME) # the image name specified when doing `docker build` | ||
ports: | ||
- containerPort: 7860 | ||
volumeMounts: | ||
- mountPath: /webui/models | ||
name: models-volume | ||
- mountPath: /webui/outputs | ||
name: image-outputs | ||
- mountPath: /webui/extensions | ||
name: extensions-volume | ||
- mountPath: /webui/embeddings | ||
name: embeddings-volume | ||
resources: | ||
limits: | ||
nvidia.com/gpu: 1 # Adjust according to your needs | ||
readinessProbe: | ||
httpGet: | ||
path: / | ||
port: 7860 | ||
initialDelaySeconds: 120 | ||
periodSeconds: 30 | ||
volumes: | ||
- name: models-volume | ||
hostPath: | ||
path: $(YOUR-LOCAL-PATH)/models # absolute path of pre-download model on the host machine | ||
- name: image-outputs | ||
hostPath: | ||
path: $(YOUR-LOCAL-PATH)/outputs | ||
- name: extensions-volume | ||
hostPath: | ||
path: $(YOUR-LOCAL-PATH)/extensions # absolute path of extensions | ||
- name: embeddings-volume | ||
hostPath: | ||
path: $(YOUR-LOCAL-PATH)/embeddings # absolute path of pre-download embeddings | ||
|
||
|
||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: stable-diffusion-webui-service | ||
spec: | ||
type: NodePort # You can change this to LoadBalancer if needed | ||
ports: | ||
- port: 7860 | ||
targetPort: 7860 | ||
selector: | ||
app: stable-diffusion-webui |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters