Spaces:
Running
Running
| # Script to prepare for HuggingFace deployment | |
| # Ensure we're in production mode | |
| sed -i '' 's/ENV FLASK_ENV=development/ENV FLASK_ENV=production/g' Dockerfile | |
| # Build frontend to verify it works | |
| echo "Testing frontend build..." | |
| cd frontend | |
| npm install | |
| npm run build | |
| if [ $? -ne 0 ]; then | |
| echo "Frontend build failed! Please fix errors before deploying." | |
| exit 1 | |
| fi | |
| cd .. | |
| # Test the Docker build | |
| echo "Testing Docker build..." | |
| docker build -t omnisealbench-deploy-test . | |
| if [ $? -ne 0 ]; then | |
| echo "Docker build failed! Please fix errors before deploying." | |
| exit 1 | |
| fi | |
| echo "=== DEPLOYMENT PREPARATION COMPLETE ===" | |
| echo "Push your code to HuggingFace with:" | |
| echo "git add ." | |
| echo "git commit -m 'Ready for deployment'" | |
| echo "git push huggingface main" | |