msrcam commited on
Commit
83f0a77
·
verified ·
1 Parent(s): 114554e

Fix line endings: setup_caption.sh

Browse files
Files changed (1) hide show
  1. scripts/setup_caption.sh +39 -39
scripts/setup_caption.sh CHANGED
@@ -1,39 +1,39 @@
1
- #!/bin/bash
2
- # Dataset-Prep v3 Caption setup
3
- # Includes ALL base deps + Ollama + Qwen2.5-VL captioning model
4
- set -e
5
-
6
- echo "=== Dataset-Prep v3: Caption Setup ==="
7
-
8
- # Run base setup first
9
- SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
10
- if [ -f "$SCRIPT_DIR/setup_base.sh" ]; then
11
- bash "$SCRIPT_DIR/setup_base.sh"
12
- else
13
- python3 -c "
14
- from huggingface_hub import hf_hub_download
15
- path = hf_hub_download('msrcam/ds-prep-backend', 'scripts/setup_base.sh', repo_type='dataset')
16
- print(path)
17
- " > /tmp/base_path.txt
18
- bash "$(cat /tmp/base_path.txt)"
19
- fi
20
-
21
- # Install Ollama
22
- echo "Installing Ollama..."
23
- if command -v ollama &> /dev/null; then
24
- echo "Ollama already installed."
25
- else
26
- curl -fsSL https://ollama.com/install.sh | sh
27
- fi
28
-
29
- # Start Ollama
30
- export OLLAMA_NUM_PARALLEL=4
31
- nohup ollama serve > /tmp/ollama.log 2>&1 &
32
- echo $! > /tmp/ollama.pid
33
- sleep 5
34
-
35
- # Pull caption model
36
- echo "Pulling Qwen2.5-VL 7B..."
37
- ollama pull huihui_ai/qwen2.5-vl-abliterated:7b
38
-
39
- echo "=== Caption setup complete ==="
 
1
+ #!/bin/bash
2
+ # Dataset-Prep v3 — Caption setup
3
+ # Includes ALL base deps + Ollama + Qwen2.5-VL captioning model
4
+ set -e
5
+
6
+ echo "=== Dataset-Prep v3: Caption Setup ==="
7
+
8
+ # Run base setup first
9
+ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
10
+ if [ -f "$SCRIPT_DIR/setup_base.sh" ]; then
11
+ bash "$SCRIPT_DIR/setup_base.sh"
12
+ else
13
+ python3 -c "
14
+ from huggingface_hub import hf_hub_download
15
+ path = hf_hub_download('msrcam/ds-prep-backend', 'scripts/setup_base.sh', repo_type='dataset')
16
+ print(path)
17
+ " > /tmp/base_path.txt
18
+ bash "$(cat /tmp/base_path.txt)"
19
+ fi
20
+
21
+ # Install Ollama
22
+ echo "Installing Ollama..."
23
+ if command -v ollama &> /dev/null; then
24
+ echo "Ollama already installed."
25
+ else
26
+ curl -fsSL https://ollama.com/install.sh | sh
27
+ fi
28
+
29
+ # Start Ollama
30
+ export OLLAMA_NUM_PARALLEL=4
31
+ nohup ollama serve > /tmp/ollama.log 2>&1 &
32
+ echo $! > /tmp/ollama.pid
33
+ sleep 5
34
+
35
+ # Pull caption model
36
+ echo "Pulling Qwen2.5-VL 7B..."
37
+ ollama pull huihui_ai/qwen2.5-vl-abliterated:7b
38
+
39
+ echo "=== Caption setup complete ==="