Skip to content

Commit 29dc8ce

Browse files
committed
fix(dev): use shell for piped commands in Ansible
This fix ensures that we use the `shell` module instead of `command` since `command` does not support pipes (`|`). This prevents errors when checking for installed packages and configurations.
1 parent 6de691c commit 29dc8ce

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

scripts/README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This repository includes an [Ansible playbook](https://docs.ansible.com/ansible/
1919
- **Storage**: 100GB
2020

2121
> [!TIP]
22-
> You can use the `spinup_comfystream_tensordock.py --bare-vm` script to create a [compatible VM on TensorDock](https://marketplace.tensordock.com/deploy?gpu=geforcertx4090-pcie-24gb&gpuCount=1&ramAmount=16&vcpuCount=4&storage=100&os=Ubuntu-22.04-LTS).
22+
> You can use the `spinup_comfystream_tensordock.py --bare-vm` script to create a [compatible VM on TensorDock](https://marketplace.tensordock.com/deploy?gpu=geforcertx4090-pcie-24gb&gpuCount=1&ramAmount=16&vcpuCount=4&storage=100&os=Ubuntu-22.04-LTS)
2323
2424
2. **Open Required Ports**:
2525
Ensure the following ports are open **inbound and outbound** on the VM's firewall/security group:
@@ -39,12 +39,15 @@ This repository includes an [Ansible playbook](https://docs.ansible.com/ansible/
3939
ansible-playbook -i ansible/inventory.yaml ansible/plays/setup_comfystream.yaml
4040
```
4141

42-
6. **Access the Server**:
43-
After successful execution, the access URLs for **ComfyStream** will be displayed.
42+
> [!IMPORTANT]
43+
> When using a non-sudo user, add `--ask-become-pass` to provide the sudo password or use an Ansible vault for secure storage.
44+
45+
6. Access the Server:
46+
Once the **Ansible playbook** completes successfully, the **ComfyStream** container will start, downloading models and building TensorRT engines. When ready, access **ComfyUI** at `https://<VM_IP>:<PORT_THAT_FORWARDS_TO_8189>`.
4447

4548
> [!IMPORTANT]
4649
> If you encounter a `toomanyrequests` error while pulling the Docker image, either wait a few minutes or provide your Docker credentials when running the playbook:
47-
>
50+
>
4851
> ```bash
4952
> ansible-playbook -i ansible/inventory.yaml ansible/plays/setup_comfystream.yaml -e "docker_hub_username=your_dockerhub_username docker_hub_password=your_dockerhub_pat"
5053
> ```

scripts/ansible/plays/setup_comfystream.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,12 @@
142142
notify: restart caddy
143143
# Ensure NVIDIA Container Toolkit is installed and configured
144144
- name: Check if NVIDIA Container Toolkit is installed
145-
command: dpkg -l | grep nvidia-container-toolkit
145+
shell: dpkg -l | grep nvidia-container-toolkit
146146
register: nvidia_toolkit_installed
147147
ignore_errors: yes
148148
changed_when: false
149149
- name: Check if NVIDIA runtime is configured in Docker
150-
command: docker info | grep -i nvidia
150+
shell: docker info | grep -i nvidia
151151
register: nvidia_runtime_configured
152152
ignore_errors: yes
153153
changed_when: false
@@ -244,6 +244,9 @@
244244
- "8188:8188"
245245
- "8889:8889"
246246
command: "--download-models --build-engines --server"
247+
- name: Display Ansible completion message
248+
debug:
249+
msg: ComfyStream is starting up, downloading models, and building TensorRT engines—this may take a while. Access ComfyUI when ready at https://<hosturl>:<COMFYUIPort>.
247250

248251
handlers:
249252
- name: restart caddy

0 commit comments

Comments
 (0)