-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
62 lines (56 loc) · 1.83 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
ROCM_GPU ?= $(strip $(shell rocminfo | grep -m 1 -E gfx[^0]{1} | sed -e 's/ *Name: *//'))
ifeq ($(ROCM_GPU), gfx1030)
HSA_OVERRIDE_GFX_VERSION = 10.3.0
else ifeq ($(ROCM_GPU), gfx1100)
HSA_OVERRIDE_GFX_VERSION = 11.0.0
else
HSA_OVERRIDE_GFX_VERSION = "GFX version detection error"
endif
CONDA_DIR = $(PWD)/data/miniconda_comfyui_v2.4.0
build:
docker build -t comfyui-rocm:$(tag) -f docker/Dockerfile .
publish:
docker image tag comfyui-rocm:$(tag) hardandheavy/comfyui-rocm:$(tag)
docker push hardandheavy/comfyui-rocm:$(tag)
docker image tag comfyui-rocm:$(tag) hardandheavy/comfyui-rocm:latest
docker push hardandheavy/comfyui-rocm:latest
bash-dev:
docker run -it --rm \
-p 80:80 \
--device=/dev/kfd \
--device=/dev/dri \
-e HSA_OVERRIDE_GFX_VERSION=$(HSA_OVERRIDE_GFX_VERSION) \
-v ./data/check:/check \
-v ./data/home:/root \
-v ./data/miniconda_comfyui_v$(tag):/opt/miniconda \
-v ./data/comfyui:/comfyui \
comfyui-rocm:$(tag) bash
bash:
docker run -it --rm \
-p 80:80 \
--device=/dev/kfd \
--device=/dev/dri \
-e HSA_OVERRIDE_GFX_VERSION=$(HSA_OVERRIDE_GFX_VERSION) \
-v ./data/check:/check \
-v ./data/home:/root \
-v $(CONDA_DIR):/opt/miniconda \
-v ./data/comfyui:/comfyui \
hardandheavy/comfyui-rocm:latest bash
seed-conda:
if [ ! -f "$(CONDA_DIR)/conda-check-seed-file" ]; then \
docker run -it --rm \
-v $(CONDA_DIR):/opt/miniconda_seed \
hardandheavy/comfyui-rocm:latest sh -c \
"cp -r /opt/miniconda/* /opt/miniconda_seed && \
touch /opt/miniconda_seed/conda-check-seed-file"; fi
run: seed-conda
docker run -it --rm \
-p 80:80 \
--device=/dev/kfd \
--device=/dev/dri \
-e HSA_OVERRIDE_GFX_VERSION=$(HSA_OVERRIDE_GFX_VERSION) \
-v ./data/check:/check \
-v ./data/home:/root \
-v $(CONDA_DIR):/opt/miniconda \
-v ./data/comfyui:/comfyui \
hardandheavy/comfyui-rocm:latest