This repository was archived by the owner on Dec 20, 2024. It is now read-only.
Replies: 2 comments
-
|
been tried your example step to reproduce this issue, and i think you already solve this issue using hardcoded requirement.txt file. can we close this discussion i think? |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
This discussion was automatically locked because the community moved to a new site. Please join us at vercel.community |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Im trying to deploy a FastAPI application on Vercel with Serverless Functions using the Python Runtime.
And Im use poetry as package manager for python.
Since vercel-python doesnt supports poetry yet, it looks for
requirements.txtat root dir.Example
requirements.txtformat:Vercel recognize this format and everything runs smoothly with successful deployment.
At the same time
poetrycan exportrequirements.txtfrom its virtual environment with the command:poetry export -f requirements.txt --without-hashes --output requirements.txtThis export
requirements.txtbut in different format:If I try to deploy with this
requirements.txtformat, vercel doesnt recognize it, so it install nothing.ps: I get this error: Code: FUNCTION_INVOCATION_FAILED
But if I try to install in my system from this format:
It works!!!
I tried exporting with hashes and without, yet no hope :\
my
vercel.json:{ "version": 2, "devCommand": "python3 main.py", "env": { "PYTHONPATH": "app/" }, "builds": [ { "src": "/app/main.py", "use": "@vercel/python", "config": { "maxLambdaSize": "15mb", "runtime": "python3.12" } } ], "routes": [ { "src": "/(.*)", "dest": "app/main.py" } ] }working repo link: https://github.com/tokitouq/mangareader-api
Example
https://mangareader-h3tmewgmq-tokitos-projects.vercel.app/
Steps to Reproduce
poetry installpoetry export -f requirements.txt --without-hashes --output requirements.txtvercel.jsonand try to deployBeta Was this translation helpful? Give feedback.
All reactions