Skip to content

Commit

Permalink
Merge pull request #1 from LEv145/cpu-docker
Browse files Browse the repository at this point in the history
Cpu docker
  • Loading branch information
LEv145 authored Mar 27, 2023
2 parents 8ccc455 + 151cb8d commit 9808443
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 25 deletions.
25 changes: 0 additions & 25 deletions docker-compose.yml

This file was deleted.

75 changes: 75 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
version: "3.9"
name: "comfyui"


x-base_service: &base_service
image: comfyui:1
build:
context: ..
dockerfile: docker/docker_files/default.Dockerfile

environment:
- CLI_ARGS=--listen --port 8188

ports:
- "8188:8188"
volumes:
- models:/opt/comfy_ui/models
- output:/opt/comfy_ui/output
- input:/opt/comfy_ui/input
- custom_nodes:/opt/comfy_ui/custom_nodes
restart: unless-stopped

x-nvidia_docker: &nvidia_docker
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ["0"]
capabilities: [gpu]

x-base_service_amd: &amd_docker
build:
context: ..
dockerfile: docker/docker_files/amd.Dockerfile

group_add:
- video
devices:
- "/dev/dri"
- "/dev/kfd"


services:
nvidia:
<<: *base_service
<<: *nvidia_docker
profiles: ["nvidia"]

amd:
<<: *base_service
<<: *amd_docker
profiles: ["amd"]

amd6600:
<<: *base_service
<<: *amd_docker
profiles: ["amd6600"]

environment:
- HSA_OVERRIDE_GFX_VERSION=10.3.0
- CLI_ARGS=--listen --port 8188

cpu:
<<: *base_service
profiles: ["cpu"]
environment:
- CLI_ARGS=--listen --port 8188 --cpu


volumes:
models:
output:
input:
custom_nodes:
17 changes: 17 additions & 0 deletions docker/docker_files/amd.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM python:3.10-slim


WORKDIR /opt/comfy_ui


RUN PIP_NO_CACHE_DIR=1 pip install --extra-index-url https://download.pytorch.org/whl/rocm5.4.2 \
torch \
torchvision \
torchaudio

COPY . /opt/comfy_ui
RUN pip install -r requirements.txt


ENV CLI_ARGS=""
CMD python main.py ${CLI_ARGS}
File renamed without changes.

0 comments on commit 9808443

Please sign in to comment.