Skip to content

Fix Render deploy: add gunicorn to services/ml_api requirements#11

Merged
f1shyfang merged 1 commit into
mainfrom
fix/ml-api-gunicorn-dep
May 30, 2026
Merged

Fix Render deploy: add gunicorn to services/ml_api requirements#11
f1shyfang merged 1 commit into
mainfrom
fix/ml-api-gunicorn-dep

Conversation

@f1shyfang
Copy link
Copy Markdown
Owner

Problem

Render deploy crashed on boot: bash: line 1: gunicorn: command not found (exit 127). render.yaml's start command uses gunicorn, but the build installs services/ml_api/requirements.txt, which didn't include it (the old requirements_api.txt that had gunicorn was removed in #10).

Fix

  • Add gunicorn to services/ml_api/requirements.txt.
  • Pin scikit-learn==1.7.2 to match the version output/models was pickled with (removes the InconsistentVersionWarning).

Verification (local, exact Render start command)

gunicorn services.ml_api.main:app -k uvicorn.workers.UvicornWorker --bind 0.0.0.0:$PORT boots cleanly; GET /health{"status":"ok","models_loaded":true}; POST /analyze returns predictions. Model loads with no version warning under 1.7.2.

🤖 Generated with Claude Code

Render deploy failed with 'gunicorn: command not found' (exit 127) because
render.yaml installs services/ml_api/requirements.txt, which lacked gunicorn.
Add it, and pin scikit-learn==1.7.2 to match the version output/models was
pickled with (avoids the InconsistentVersionWarning / invalid-results risk).

Verified: gunicorn services.ml_api.main:app -k uvicorn.workers.UvicornWorker
boots; /health ok and /analyze returns predictions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 30, 2026 11:32
@vercel
Copy link
Copy Markdown

vercel Bot commented May 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lyra-hackathon Ready Ready Preview, Comment May 30, 2026 11:33am

@f1shyfang f1shyfang merged commit 35070b0 into main May 30, 2026
1 of 3 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@f1shyfang f1shyfang deleted the fix/ml-api-gunicorn-dep branch May 30, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants