Having implemented BentoML on most of our AI proje...
# ask-for-help
t
Having implemented BentoML on most of our AI projects, I'm facing an issue with upgrading to 1.3.7 (from 1.2), including usage of UV. This log is from running
bentoml containerize xray:slbjsid4u2xxi56s
immediately after
bentoml build
. I am not manually copying/moving a pyproject.toml or setup.py. I do have a pyproject.toml in my repo, that I export from using
uv export --output-file requirements.txt --no-dev --no-hashes
, as bentoml doesn't support pyproject.toml files. But why is it looking for a pyproject.toml or setup.py file in the containerization script?
Copy code
0.359 + uv pip install --no-deps -r /home/bentoml/bento/env/python/requirements.txt
1.721 error: /home/bentoml/bento/env/python does not appear to be a Python project, as neither `pyproject.toml` nor `setup.py` are present in the directory
------
Dockerfile:49
--------------------
  47 |     COPY --chown=bentoml:bentoml ./env/python ./env/python/
  48 |     # install python packages with install.sh
  49 | >>> RUN --mount=type=cache,target=/root/.cache/uv bash -euxo pipefail /home/bentoml/bento/env/python/install.sh
  50 |     COPY --chown=bentoml:bentoml . ./
  51 |     
--------------------
This is my bentofile.yaml:
Copy code
service: xray.mlops.xray_service:XrayService
description: Xray model

labels:
  owner: unumed
  stage: dev

include:
  - "xray/**/*.py"
  - "mlops/**/*.py"
  - "data/ontologies/**/*.py"

exclude:
  - "*.pyc"
  - "__pycache__/"
  - "data/ontologies/raw"
  - "data/ontologies/*.parquet"

python:
  requirements_txt: "requirements.txt"
  lock_packages: false
  pip_args: --no-deps

docker:
  python_version: "3.10"
  cuda_version: "12.1"
j
What is the content of
/home/bentoml/bento/env/python/requirements.txt
?
t
I assume it's this file in my local machine:
~/bentoml/bentos/xray/slbjsid4u2xxi56s/env/python/requirements.txt
right?
Copy code
# This file was autogenerated by uv via the following command:
#    uv export --output-file requirements.txt --no-dev --no-hashes
--editable .
absl-py==2.1.0; platform_system == "Darwin" or (platform_machine == "aarch64" and platform_system == "Linux") or python_full_version == "3.10.*"
./wheels/ai_utils.zip ; platform_system == "Darwin" or (platform_machine == "aarch64" and platform_system == "Linux") or python_full_version == "3.10.*"
etc
...
Any ideas I can try out?
j
should be caused by the
--editable .
line
❤️ 1
t
Amazing, it works! Ill just have to figure out which flag in the export command will prevent -e . to be added to the requirements.txt
Thank you so much
j
glad to help