-
Notifications
You must be signed in to change notification settings - Fork 811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: uv pip install results in "Error no virtual environment found" #4936
Comments
You can set BentoML/src/bentoml/_internal/container/frontend/dockerfile/templates/base_debian.j2 Line 15 in 1764c69
|
Still not working - no idea what to do @frostming , open issue again ? |
What does your Dockerfile look like? You can find it at |
# ===========================================
#
# THIS IS A GENERATED DOCKERFILE. DO NOT EDIT
#
# ===========================================
# Block SETUP_BENTO_BASE_IMAGE
FROM europe-docker.pkg.dev/nube-hub/docker/<IMAGE>:<IMAGE_TAG> as base-container
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
ENV PYTHONIOENCODING=UTF-8
ENV PYTHONUNBUFFERED=1
# Block SETUP_BENTO_USER
ARG BENTO_USER=bentoml
ARG BENTO_USER_UID=1034
ARG BENTO_USER_GID=1034
RUN groupadd -g $BENTO_USER_GID -o $BENTO_USER && useradd -m -u $BENTO_USER_UID -g $BENTO_USER_GID -o -r $BENTO_USER
ARG BENTO_PATH=/home/bentoml/bento
ENV BENTO_PATH=$BENTO_PATH
ENV BENTOML_HOME=/home/bentoml/
RUN mkdir $BENTO_PATH && chown bentoml:bentoml $BENTO_PATH -R
WORKDIR $BENTO_PATH
# Block SETUP_BENTO_COMPONENTS
COPY --chown=bentoml:bentoml ./env/python ./env/python/
# install python packages with install.sh
RUN bash -euxo pipefail /home/bentoml/bento/env/python/install.sh
COPY --chown=bentoml:bentoml . ./
# Block SETUP_BENTO_ENTRYPOINT
# Default port for BentoServer
EXPOSE 3000
# Expose Prometheus port
EXPOSE 3001
RUN chmod +x /home/bentoml/bento/env/docker/entrypoint.sh
USER bentoml
ENTRYPOINT [ "/home/bentoml/bento/env/docker/entrypoint.sh" ]
(I've obfuscated the IMAGE and IMAGE_TAG) |
We've also got |
@poudrouxj try adding using dockerfile template: https://docs.bentoml.com/en/latest/guides/build-options.html#docker-options-table |
Do you have an example on the syntax? Is it like this? https://docs.bentoml.com/en/v1.1.11/guides/containerization.html#writing-dockerfile-template (couldnt find it in the latest docs) Edit: My buest guess from looking at the docs: {% extends bento_base_template %}
{% block SETUP_BENTO_BASE_IMAGE %}
{{ super() }}
ENV UV_SYSTEM_PYTHON=1
{% endblock %} |
The above seemed to have worked 👍 |
Describe the bug
When running
bentoml cointainerize
on abento
with a custom base image which was built usingbentoml==1.3.2
in a build environment withbentoml==1.3.2
we receive the following error:Perhaps by adding a
--system
as disclosed in astral-sh/uv#1374 (comment) will help?Note we're using a custom base image.
To reproduce
No response
Expected behavior
No response
Environment
bentoml==1.3.2
platform=linux/amd64
(We're running this in the CI on a github workflow runner)
The text was updated successfully, but these errors were encountered: