techfreakworm commited on
Commit
599f87d
·
unverified ·
1 Parent(s): aa72c2d

chore: idempotent setup.sh — venv, submodule, custom nodes, models

Browse files
Files changed (1) hide show
  1. setup.sh +47 -0
setup.sh ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
5
+ cd "$REPO_ROOT"
6
+
7
+ echo "▶ Creating Python 3.11 venv"
8
+ python3.11 -m venv .venv
9
+ # shellcheck disable=SC1091
10
+ source .venv/bin/activate
11
+ pip install -U pip wheel
12
+
13
+ echo "▶ Initializing ComfyUI submodule"
14
+ git submodule update --init --recursive
15
+
16
+ echo "▶ Installing ComfyUI core requirements"
17
+ pip install -r comfyui/requirements.txt
18
+
19
+ echo "▶ Installing pinned custom nodes"
20
+ mkdir -p comfyui/custom_nodes
21
+ cd comfyui/custom_nodes
22
+ for repo in \
23
+ Lightricks/ComfyUI-LTXVideo \
24
+ kijai/ComfyUI-KJNodes \
25
+ rgthree/rgthree-comfy \
26
+ Kosinkadink/ComfyUI-VideoHelperSuite \
27
+ pythongosssss/ComfyUI-Custom-Scripts ; do
28
+ name="${repo##*/}"
29
+ if [[ ! -d "$name" ]]; then
30
+ git clone --depth 1 "https://github.com/$repo.git" "$name"
31
+ fi
32
+ if [[ -f "$name/requirements.txt" ]]; then
33
+ pip install -r "$name/requirements.txt"
34
+ fi
35
+ done
36
+ cd "$REPO_ROOT"
37
+
38
+ echo "▶ Installing AIO app dependencies"
39
+ pip install -r requirements.txt
40
+
41
+ echo "▶ Symlinking models from HF cache"
42
+ python tools/refresh_models.py || true # ok to fail before tools/ exists
43
+
44
+ echo
45
+ echo "✓ Setup complete."
46
+ echo " Activate venv: source .venv/bin/activate"
47
+ echo " Run app: python app.py"