NautilusTrainer / run_prod_docker.sh
Nautilus AI
Deploy: Trainer to Root (Retry)
c5c085b
raw
history blame contribute delete
926 Bytes
#!/bin/bash
# NautilusTrainer Production Simulation
# Builds the Docker container and runs it exactly as HF Space would.
APP_NAME="nautilus-trainer-prod"
echo "🐳 Building Docker Image..."
docker build -t $APP_NAME ./NautilusTrainer
if [ $? -ne 0 ]; then
echo "❌ Docker Build Failed."
exit 1
fi
echo "βœ… Build Success."
# Check for HF_TOKEN
if [ -z "$HF_TOKEN" ]; then
echo "⚠️ WARNING: HF_TOKEN is not set in your environment."
echo " Training will likely fail when trying to stream data."
echo " Usage: HF_TOKEN=hf_... ./run_prod_docker.sh"
read -p " Do you want to continue anyway? (y/n) " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 1
fi
fi
echo "πŸš€ Running Container on port 7860..."
echo " Access Dashboard at: http://localhost:7860"
echo " Press Ctrl+C to stop."
docker run --rm -p 7860:7860 \
-e HF_TOKEN=$HF_TOKEN \
$APP_NAME