File size: 789 Bytes
7dcec51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/bin/bash

# Deploy Myanmar Ghost model

set -e

echo "🚀 Starting model deployment..."

# Parse arguments
MODEL_PATH=${1:-"outputs/models/best_model.pt"}
OUTPUT_DIR=${2:-"outputs/deployment"}
FORMAT=${3:-"safetensors"}
HUB_REPO=${4:-""}

# Activate virtual environment if exists
if [ -d "venv" ]; then
    source venv/bin/activate
fi

# Install deployment dependencies
pip install -q safetensors huggingface_hub

# Run deployment pipeline
python -m src.pipelines.deployment_pipeline \
    --model_path "$MODEL_PATH" \
    --output_dir "$OUTPUT_DIR" \
    --format "$FORMAT" \
    ${HUB_REPO:+--push_hub --repo_id "$HUB_REPO"}

echo "✅ Deployment complete!"
echo "Model exported to: $OUTPUT_DIR"

if [ -n "$HUB_REPO" ]; then
    echo "Pushed to: https://huggingface.co/$HUB_REPO"
fi