bentoml / BentoML

The easiest way to serve AI apps and models - Build Model Inference APIs, Job queues, LLM apps, Multi-model pipelines, and more!
https://bentoml.com
Apache License 2.0
7.19k stars 793 forks source link

feature: Support for poetry for installing dependencies in bento #4009

Open arkodoescode opened 1 year ago

arkodoescode commented 1 year ago

Feature request

I would like it if bentofile python field could support a pyproject.toml value in requirements instead of a requirements.txt file with support for poetry.

Motivation

Poetry is used in production quite a lot and this seems like a natural choice.

Other

No response

bojiang commented 1 year ago

Agree. It makes sense to support PEP 621. And the good news is pip-tools (we are using it to lock the dependencies) already supports it. Thus it should be a natural change. https://github.com/jazzband/pip-tools/issues/1510

bojiang commented 1 year ago

Would you like to help adding this feature?

aarnphm commented 1 year ago

I think adding poetry is nice, but it is just adding a churn for us to maintain.

Esp in the past, we haven't had good experiences with poetry. Not sure if this has changed with the recent release. Maybe we can add support for pdm since we have @frostming 😃

arkodoescode commented 1 year ago

Would you like to help adding this feature?

arkodoescode commented 1 year ago

Would you like to help adding this feature?

I would love to help if and when I have bandwidth.

aarnphm commented 1 year ago

I think a better discussion is to make bento pip-installable, rather than supporting specific backend for installation. Because at the end of the day, I think all packages can/should just be installed with pip within an isolated container.

ianwesleyarmstrong commented 1 year ago

Any updates on this? It would be great addition IMO

aarnphm commented 1 year ago

@frostming I think for Bento it can also generate a pyproject.toml. with this it will probably support whatever framework backend for PEP621

Would be a great feature for this is to make pip-installable bento, probably an adjacent feature