Fixes for systemd unit files
This commit is contained in:
@@ -21,6 +21,7 @@ podman build -t localhost/comfy:latest .
|
|||||||
|
|
||||||
Place comfy.socket in ` ~/.config/systemd/user`, adjust ports and interfaces if needed.
|
Place comfy.socket in ` ~/.config/systemd/user`, adjust ports and interfaces if needed.
|
||||||
Place comfy.container in `~/.config/containers/systemd`. Adjust paths for models and config if desired.
|
Place comfy.container in `~/.config/containers/systemd`. Adjust paths for models and config if desired.
|
||||||
|
**Important: if you set up multiple instances with multiple ROCM devices, adjust the VISIBLE_DEVICES environment variable in the service units**
|
||||||
The files are in `utils/socket_activation`, next to this readme.
|
The files are in `utils/socket_activation`, next to this readme.
|
||||||
|
|
||||||
Put model files into the models directory (`~/models`).
|
Put model files into the models directory (`~/models`).
|
||||||
|
|||||||
@@ -1,13 +1,16 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Comfy ui in a ROCM container
|
Description=Comfy ui in a ROCM container
|
||||||
After=network-online.target
|
After=comfy.socket
|
||||||
Wants=network-online.target
|
Requires=comfy.socket
|
||||||
|
|
||||||
|
|
||||||
[Container]
|
[Container]
|
||||||
Image=localhost/comfy:latest
|
Image=localhost/comfy:latest
|
||||||
#AutoRemove=yes
|
#AutoRemove=yes
|
||||||
#PublishPort=8080:8080
|
#PublishPort=8080:8080
|
||||||
Environment=ROCR_VISIBLE_DEVICES="GGPU-3b0c81617337ec1b"
|
# UUID given by ROCM-Info, uncomment to restrict to a particular device
|
||||||
|
# Alternatively can use numeric ID
|
||||||
|
#Environment=ROCR_VISIBLE_DEVICES="GGPU-3b0c81617337ec1b"
|
||||||
Network=none
|
Network=none
|
||||||
Volume=%h/comfy/models:/comfyui/models:ro,z
|
Volume=%h/comfy/models:/comfyui/models:ro,z
|
||||||
Volume=%h/comfy/input:/comfyui/input:Z
|
Volume=%h/comfy/input:/comfyui/input:Z
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Comfy ui in a ROCM container
|
Description=Comfy ui in a ROCM container
|
||||||
After=network-online.target
|
After=comfy2.socket
|
||||||
Wants=network-online.target
|
Requires=comfy2.socket
|
||||||
|
|
||||||
[Container]
|
[Container]
|
||||||
Image=localhost/comfy:latest
|
Image=localhost/comfy:latest
|
||||||
#AutoRemove=yes
|
#AutoRemove=yes
|
||||||
#PublishPort=8080:8080
|
#PublishPort=8080:8080
|
||||||
Network=none
|
Network=none
|
||||||
|
|
||||||
|
# Adjust UUID or device number
|
||||||
Environment=ROCR_VISIBLE_DEVICES="GPU-3ce290c173497dfb"
|
Environment=ROCR_VISIBLE_DEVICES="GPU-3ce290c173497dfb"
|
||||||
Volume=%h/comfy/models:/comfyui/models:ro,z
|
Volume=%h/comfy/models:/comfyui/models:ro,z
|
||||||
Volume=%h/comfy/input2:/comfyui/input:Z
|
Volume=%h/comfy/input2:/comfyui/input:Z
|
||||||
|
|||||||
Reference in New Issue
Block a user