-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathentrypoint.sh
More file actions
49 lines (41 loc) · 1.64 KB
/
entrypoint.sh
File metadata and controls
49 lines (41 loc) · 1.64 KB
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
#!/usr/bin/env bash
set -e
# ------------------------------
# Detect GPU and set HSA_OVERRIDE_GFX_VERSION
# ------------------------------
detect_gpu() {
local gfx_version
gfx_version=$(rocminfo 2>/dev/null | grep -oP 'gfx\d+' | head -1)
case "$gfx_version" in
# RDNA 4
gfx1201) export HSA_OVERRIDE_GFX_VERSION="12.0.1" ;; # RX 9070 XT
gfx1200) export HSA_OVERRIDE_GFX_VERSION="12.0.0" ;; # RX 9070
# RDNA 3
gfx1100) export HSA_OVERRIDE_GFX_VERSION="11.0.0" ;; # RX 7900 XTX/XT
gfx1101) export HSA_OVERRIDE_GFX_VERSION="11.0.0" ;; # RX 7800/7700 XT
gfx1102) export HSA_OVERRIDE_GFX_VERSION="11.0.0" ;; # RX 7600/7600S/XT
# RDNA 2
gfx1030) export HSA_OVERRIDE_GFX_VERSION="10.3.0" ;; # RX 6900/6800/6700
gfx1031) export HSA_OVERRIDE_GFX_VERSION="10.3.0" ;; # RX 6650/6600 XT
gfx1032) export HSA_OVERRIDE_GFX_VERSION="10.3.0" ;; # RX 6600/6500
*) echo "Warning: Unknown GPU $gfx_version, no override set" ;;
esac
echo "▶ Detected GPU: $gfx_version"
echo "▶ HSA_OVERRIDE_GFX_VERSION=$HSA_OVERRIDE_GFX_VERSION"
}
detect_gpu
# ------------------------------
# Setup models cache directory
# ------------------------------
export XDG_CACHE_HOME=/models
export WHISPER_CACHE_DIR=/models
# ------------------------------
# Setup data directories
# ------------------------------
mkdir -p /data/input /data/output
echo "▶ Starting Whisper Web UI..."
echo "▶ Access the UI at http://localhost:7860"
echo "▶ Models will be cached in /models"
echo "▶ Input files: /data/input"
echo "▶ Output files: /data/output"
exec python /app/whisper_ui.py