-
Notifications
You must be signed in to change notification settings - Fork 27.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for Docker. Container can easily be started with docker compose #16688
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
models | ||
models/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM python:3.10-bookworm | ||
|
||
WORKDIR /webui | ||
|
||
RUN apt-get update && \ | ||
apt-get install ffmpeg libsm6 libxext6 dos2unix google-perftools -y | ||
|
||
COPY . . | ||
|
||
RUN dos2unix ./webui.sh ./webui-user.sh | ||
|
||
RUN groupadd --system --gid 1000 webui && \ | ||
useradd webui --uid 1000 --gid 1000 --create-home --shell /bin/bash && \ | ||
chown -R webui:webui . | ||
USER 1000:1000 | ||
|
||
RUN ./webui.sh --exit --skip-torch-cuda-test | ||
|
||
CMD [ "./webui.sh", "--skip-prepare-environment", "--listen" ] |
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there're already several yaml files under There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From what I've gathered that's where the customizations made in the webui are persisted |
||
target: /webui/configs | ||
ports: | ||
- 7860:7860 | ||
deploy: | ||
resources: | ||
reservations: | ||
devices: | ||
- driver: nvidia | ||
count: all | ||
capabilities: [gpu] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not just
python:3.10
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe another alternative is nvcr.io/nvidia/pytorch:24.12-py3 which torch and cuda embeded.