Update entrypoint.sh
Browse files- entrypoint.sh +11 -11
entrypoint.sh
CHANGED
|
@@ -5,40 +5,40 @@ MODEL_PATH="/app/models/nur.gguf"
|
|
| 5 |
|
| 6 |
# Check if model exists
|
| 7 |
if [ -f "$MODEL_PATH" ]; then
|
| 8 |
-
echo "✅ Nur Brain
|
| 9 |
else
|
| 10 |
-
echo "⏳ Brain missing. Downloading
|
| 11 |
|
| 12 |
mkdir -p /app/models
|
| 13 |
|
| 14 |
-
# ⬇️
|
| 15 |
python3 -c "
|
| 16 |
from huggingface_hub import hf_hub_download
|
| 17 |
import os
|
| 18 |
try:
|
| 19 |
-
#
|
| 20 |
path = hf_hub_download(
|
| 21 |
-
repo_id='Qwen/
|
| 22 |
-
filename='
|
| 23 |
local_dir='/app/models',
|
| 24 |
local_dir_use_symlinks=False
|
| 25 |
)
|
| 26 |
-
# Rename
|
| 27 |
os.rename(path, '/app/models/nur.gguf')
|
| 28 |
-
print('✅
|
| 29 |
except Exception as e:
|
| 30 |
print(f'❌ Download failed: {e}')
|
| 31 |
exit(1)
|
| 32 |
"
|
| 33 |
fi
|
| 34 |
|
| 35 |
-
# Double check
|
| 36 |
if [ ! -f "$MODEL_PATH" ]; then
|
| 37 |
-
echo "❌ CRITICAL:
|
| 38 |
exit 1
|
| 39 |
fi
|
| 40 |
|
| 41 |
-
echo "🚀 Starting Isam's Nur Brain
|
| 42 |
|
| 43 |
# Start the API
|
| 44 |
exec uvicorn app.main:app --host 0.0.0.0 --port 7860
|
|
|
|
| 5 |
|
| 6 |
# Check if model exists
|
| 7 |
if [ -f "$MODEL_PATH" ]; then
|
| 8 |
+
echo "✅ Nur Brain is already in storage."
|
| 9 |
else
|
| 10 |
+
echo "⏳ Brain missing. Downloading Qwen2.5-1.5B-Instruct..."
|
| 11 |
|
| 12 |
mkdir -p /app/models
|
| 13 |
|
| 14 |
+
# ⬇️ VERIFIED DOWNLOAD SECTION ⬇️
|
| 15 |
python3 -c "
|
| 16 |
from huggingface_hub import hf_hub_download
|
| 17 |
import os
|
| 18 |
try:
|
| 19 |
+
# This is the official and stable repository for Qwen2.5 GGUF
|
| 20 |
path = hf_hub_download(
|
| 21 |
+
repo_id='Qwen/Qwen2.5-1.5B-Instruct-GGUF',
|
| 22 |
+
filename='qwen2.5-1.5b-instruct-q4_k_m.gguf',
|
| 23 |
local_dir='/app/models',
|
| 24 |
local_dir_use_symlinks=False
|
| 25 |
)
|
| 26 |
+
# Rename to your custom filename
|
| 27 |
os.rename(path, '/app/models/nur.gguf')
|
| 28 |
+
print('✅ Qwen Download complete!')
|
| 29 |
except Exception as e:
|
| 30 |
print(f'❌ Download failed: {e}')
|
| 31 |
exit(1)
|
| 32 |
"
|
| 33 |
fi
|
| 34 |
|
| 35 |
+
# Double check
|
| 36 |
if [ ! -f "$MODEL_PATH" ]; then
|
| 37 |
+
echo "❌ CRITICAL: Model file still missing."
|
| 38 |
exit 1
|
| 39 |
fi
|
| 40 |
|
| 41 |
+
echo "🚀 Starting Isam's Nur Brain on Port 7860..."
|
| 42 |
|
| 43 |
# Start the API
|
| 44 |
exec uvicorn app.main:app --host 0.0.0.0 --port 7860
|