BentoMLDocker

BentoML 1.4.31+ containerization fails with uv directory resolution error

critical
configurationUpdated Dec 25, 2025(via Exa)
How to detect:

BentoML version 1.4.31 and 1.4.32 fail during Docker containerization with exit code 2. The uv package manager cannot find the installation directory (./src) during the pip install step. Error occurs at Dockerfile line 49-58 during base-container build stage 10/12. The issue is specific to src layout projects using pyproject.toml.

Recommended action:

Downgrade to BentoML 1.4.30 or upgrade to 1.4.33+. For 1.4.30-1.4.32, as a workaround, modify the Dockerfile template base_v2.j2: change 'COPY --chown={{ bento__user }}:{{ bento__user }} ./env/python ./env/python/' to 'COPY --chown={{ bento__user }}:{{ bento__user }} . ./' to ensure the ./src folder exists before uv attempts to install dependencies. The fix was merged in PR #5534.