Spaces:
Runtime error
Runtime error
Deployment Ready: Fixed scam detection low confidence, added production audit report, optimized throttles
1838600 | import os | |
| import sys | |
| import importlib | |
| def check_structure(): | |
| print("π³ Simulating Docker Build Context...") | |
| # 1. Check Root Files | |
| required = ["app", "requirements.txt", "Dockerfile", ".dockerignore"] | |
| missing = [f for f in required if not os.path.exists(f)] | |
| if missing: | |
| print(f"β MISSING FILES: {missing}") | |
| return False | |
| else: | |
| print("β Root structure verified.") | |
| # 2. Check App Directory | |
| if not os.path.exists("app/main.py"): | |
| print("β app/main.py not found! Uvicorn will fail.") | |
| return False | |
| print("β app/main.py exists.") | |
| # 3. Check Dependencies (Top-Level) | |
| print("π Checking critical imports...") | |
| try: | |
| import fastapi | |
| import uvicorn | |
| import pydantic | |
| import tenacity | |
| import requests | |
| print("β Core dependencies installed.") | |
| except ImportError as e: | |
| print(f"β οΈ WARNING: Local environment missing dependency: {e}") | |
| print(" (This might be fine if Docker installs them, but ensure strict versioning in requirements.txt)") | |
| return True | |
| if __name__ == "__main__": | |
| if check_structure(): | |
| print("\nπ Ready for 'docker build -t sentinel-honeypot .'") | |
| else: | |
| print("\nπ Build pre-check FAILED.") | |
| sys.exit(1) | |