Skip to content

bug: Mismatch between log and behavior when both requirements_txt and packages are specified #5380

@isuyyy

Description

@isuyyy

Describe the bug

It is said that the packages field will be ignored when requirements_txt and packages are both given(here), but it actually does not.

To reproduce

Use the following files:

pyproject.toml

[project]
name = "serving"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = "==3.9.6"
dependencies = [
    "loguru"
]

[tool.bentoml.build]
service = "serving.service:QuickStart"
include = ["*.py"]
exclude = ["tests/"]

[tool.bentoml.build.python]
requirements_txt = "requirements.txt"

requirements.txt

click

Then run:

bentoml build 

Expected behavior

Only the packages in requirements.txt (i.e. click) should be installed, and loguru from pyproject.toml should be ignored.

Actual behavior:
Both click and loguru are included in the Bento (verified via bentoml get ${bento_name}

Environment

bentoml: 1.4.15

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions