Skip to content

bug: CUDA ubuntu images attempt to install non-existent python packages #5402

@bclark-videra

Description

@bclark-videra

Describe the bug

Ubuntu 20.04 went EOL for security updates on 2025-05-31 so I'm trying to update my container builds that use CUDA to Ubuntu 22.04 images.

In my Dockerfile template:

{% set __base_image__ = __base_image__.replace('ubuntu20.04', 'ubuntu22.04') %}

When I build the container, the generated Dockerfile attempts to install a package that doesn't exist anymore: python3.10-jammy

97.83 + apt-get install -y --no-install-recommends --allow-remove-essential python3.10-jammy pyt
98.20 Reading package lists...
98.39 Building dependency tree...
99.36 Reading state information...
99.98 E: Unable to locate package python3.10-jammy
99.98 E: Couldn't find any package by glob 'python3.10-jammy'
99.98 E: Couldn't find any package by regex 'python3.10-jammy'

It appears that the Dockerfile is attempting to install that package only when using Python 3.10 and ubuntu22.04 appears in the base image name.

The upstream repository was archived a while back so I'm guessing it's unnecessary.

To reproduce

Bentofile:

service: "deepface_bento:svc"
include:
  - "*.py"
  - "uv.lock"
  - "pyproject.toml"
docker:
  dockerfile_template: "Dockerfile.template"
  env: ".env"
  python_version: "3.10"
  cuda_version: "12"
  system_packages:
    - libgl1
    - libglib2.0-0

(simplified) Dockerfile.template

{% extends bento_base_template %}
{% set __base_image__ = __base_image__.replace('ubuntu20.04', 'ubuntu22.04') %}

Attempt to build a container with bentoml containerize.

Expected behavior

No response

Environment

Environment variable

BENTOML_DEBUG=''
BENTOML_QUIET=''
BENTOML_BUNDLE_LOCAL_BUILD=''
BENTOML_DO_NOT_TRACK=''
BENTOML_CONFIG=''
BENTOML_CONFIG_OPTIONS=''
BENTOML_PORT=''
BENTOML_HOST=''
BENTOML_API_WORKERS=''

System information

bentoml: 1.4.8
python: 3.10.16
platform: macOS-15.5-arm64-arm-64bit
uid_gid: 501:20

pip_packages
a2wsgi==1.10.8
absl-py==2.1.0
aiohappyeyeballs==2.6.1
aiohttp==3.11.16
aiosignal==1.3.2
aiosqlite==0.21.0
annotated-types==0.7.0
anyio==4.8.0
appdirs==1.4.4
asgiref==3.8.1
astunparse==1.6.3
async-timeout==5.0.1
attrs==25.2.0
beautifulsoup4==4.13.3
bentoml==1.4.8
blinker==1.9.0
boto3==1.38.45
botocore==1.38.45
cachetools==5.5.2
cattrs==23.1.2
certifi==2025.1.31
charset-normalizer==3.4.1
click==8.1.8
click-option-group==0.5.6
cloudpickle==3.1.1
deepface==0.0.79
deprecated==1.2.18
exceptiongroup==1.2.2
filelock==3.17.0
fire==0.7.0
flask==3.1.1
flatbuffers==25.2.10
frozenlist==1.5.0
fs==2.4.16
gast==0.6.0
gdown==5.2.0
google-auth==2.38.0
google-auth-oauthlib==1.2.1
google-pasta==0.2.0
grpcio==1.71.0
gunicorn==23.0.0
h11==0.16.0
h5py==3.13.0
httpcore==1.0.9
httpx==0.28.1
httpx-ws==0.7.1
idna==3.10
importlib-metadata==8.6.1
iniconfig==2.0.0
itsdangerous==2.2.0
jinja2==3.1.6
jmespath==1.0.1
joblib==1.4.2
kantoku==0.18.3
keras==2.15.0
libclang==18.1.1
lz4==4.4.3
markdown==3.7
markdown-it-py==3.0.0
markupsafe==3.0.2
mdurl==0.1.2
ml-dtypes==0.3.2
mtcnn==1.0.0
multidict==6.1.0
numpy==1.26.4
nvidia-ml-py==12.570.86
oauthlib==3.2.2
opencv-python==4.8.1.78
opentelemetry-api==1.31.0
opentelemetry-instrumentation==0.52b0
opentelemetry-instrumentation-aiohttp-client==0.52b0
opentelemetry-instrumentation-asgi==0.52b0
opentelemetry-sdk==1.31.0
opentelemetry-semantic-conventions==0.52b0
opentelemetry-util-http==0.52b0
opt-einsum==3.4.0
packaging==24.2
pandas==2.0.2
pathspec==0.12.1
pillow==11.1.0
pip-requirements-parser==32.0.1
pluggy==1.5.0
prometheus-client==0.21.1
prompt-toolkit==3.0.50
propcache==0.3.0
protobuf==4.25.8
psutil==7.0.0
py==1.11.0
pyasn1==0.6.1
pyasn1-modules==0.4.1
pydantic==2.8.2
pydantic-core==2.20.1
pygments==2.19.1
pyparsing==3.2.1
pysocks==1.7.1
pytest==6.2.5
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
python-json-logger==3.3.0
python-multipart==0.0.20
pytz==2025.1
pyyaml==6.0.2
pyzmq==26.3.0
questionary==2.1.0
requests==2.32.3
requests-oauthlib==2.0.0
retina-face==0.0.14
rich==13.9.4
rsa==4.9
s3transfer==0.13.0
schema==0.7.7
setuptools==76.0.0
shellingham==1.5.4
simple-di==0.1.5
six==1.17.0
sniffio==1.3.1
soupsieve==2.6
starlette==0.46.1
tensorboard==2.15.2
tensorboard-data-server==0.7.2
tensorflow==2.15.1
tensorflow-estimator==2.15.0
tensorflow-io-gcs-filesystem==0.37.1
tensorflow-metal==1.1.0
termcolor==2.5.0
toml==0.10.2
tomli==2.2.1
tomli-w==1.2.0
tornado==6.5.1
tqdm==4.67.1
typer==0.12.3
typing-extensions==4.12.2
tzdata==2025.1
urllib3==2.5.0
uvicorn==0.34.0
watchfiles==1.0.4
wcwidth==0.2.13
werkzeug==3.1.3
wheel==0.45.1
wrapt==1.14.1
wsproto==1.2.0
yarl==1.18.3
zipp==3.21.0

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