Adding docker capabilites to repo

This commit is contained in:
Derek Paschal 2023-02-02 16:36:03 -06:00
parent 226d840e84
commit a061ac9801
2 changed files with 33 additions and 0 deletions

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM python:3.10
WORKDIR /sd
EXPOSE 7860
RUN apt update \
&& apt install -y wget git htop
CMD [ "./webui.sh", "-f" ]

23
docker-compose.yml Normal file
View File

@ -0,0 +1,23 @@
version: '3.4'
services:
sd-docker:
container_name: sd-docker
image: git.exile.place/derek/sd-docker:latest
restart: "no"
ports:
- "7860:7860"
volumes:
- ./:/sd
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ['0']
capabilities: [gpu]
healthcheck:
test: "wget --no-verbose --tries=1 --spider http://sd-docker:7860 || exit 1"
interval: 2m
timeout: 30s
retries: 5
start_period: 5m