Spaces:
Runtime error
Runtime error
| set -eu | |
| log() { | |
| line="[$(date '+%Y-%m-%dT%H:%M:%S%z')] $*" | |
| echo "$line" | tee -a /tmp/minimal-space.log >&2 | |
| } | |
| log "start_minimal_space.sh begin" | |
| log "python version check begin" | |
| python --version 2>&1 | tee -a /tmp/minimal-space.log >&2 | |
| log "python version check end" | |
| log "import check begin" | |
| python - <<'PY' 2>&1 | tee -a /tmp/minimal-space.log >&2 | |
| import fastapi | |
| import openenv | |
| import uvicorn | |
| print(f"fastapi={fastapi.__version__}") | |
| print(f"openenv={getattr(openenv, '__version__', 'unknown')}") | |
| print(f"uvicorn={uvicorn.__version__}") | |
| PY | |
| log "import check end" | |
| log "starting heartbeat loop" | |
| ( | |
| while true; do | |
| log "heartbeat" | |
| sleep 5 | |
| done | |
| ) & | |
| log "launching uvicorn for minimal_openenv_app" | |
| exec python -m uvicorn minimal_openenv_app:app --host 0.0.0.0 --port 8000 --log-level debug --access-log | |