Hi. I'm struggling to build a Bento which is in a ...
# ask-for-help
d
Hi. I'm struggling to build a Bento which is in a monorepo structure. We have a Python tree like this:
Copy code
py/
  model-1/
    pyproject.toml
  model-2/
    pyproject.toml
  common/
    pyproject.toml
I'm struggling to figure out how to get this to work, for
model-1
to depend on
common
when
common
is in the same repo. I've tried with
uv add ../common
, and with creating a symlink from inside
model-1
to
common
, eg.
ln -s ../common common
. I've also added
include = ["common/"]
to
[tool.bentoml.build]
as per https://docs.bentoml.com/en/latest/reference/bentoml/bento-build-options.html#include. What's the correct recipe here? Thanks!
👀 1
m
Also interested in this, especially while using the Python API for configuring the build options. for now, I am manually copying the files to the service root (model-1 ...)
d
Just to be clear, I named the directories in my example badly - those top-level model directories actually contain bentos, not models. So, the problem is that I can't figure out how to get a bento to depend on a python project that doesn't live somewhere else on the network - I just want a source dependency.
👍 1
j
Hello we are discussing internally and will get back with some recommendation
🙏 2
d
I'm currently going down the path of getting wheels of the shared code published, but it's a bit of a pain - we use a monorepo structure to avoid all this publishing machinery. It's a bit pointless when you're the only consumer! 🙂 We much prefer source dependencies.
j
Hello! Sorry, we let this slip past. In short, currently we do not support local dependencies by source. You would have to build the wheel
d
OK, that's unfortunate. Thanks for following up.