llama-stack
llama-stack copied to clipboard
llama stack build not working for CONTAINER_BINARY podman with UBI9 base image.
System Info
Fedora linux OS to run llama stack build command.
Information
- [x] The official example scripts
- [ ] My own modified scripts
🐛 Describe the bug
When building the llama stack using build.yaml with a ubi9/* base image, the intermediate Containerfile will include a RUN instruction to install the necessary packages: https://github.com/meta-llama/llama-stack/blob/main/llama_stack/distribution/build_container.sh#L95-L107
Building the custom image using the above generated Containerfile fails because the dnf command requires root or sudo privileges to execute.
Error logs
+ podman build --security-opt label=disable --platform linux/amd64 -t llamastack-custom:0.2.7 -f /tmp/tmp.5320isPOBF/Containerfile . --progress=plain
STEP 1/13: FROM registry.access.redhat.com/ubi9/python-311:9.6-1747333117
Trying to pull registry.access.redhat.com/ubi9/python-311:9.6-1747333117...
Getting image source signatures
Checking if image destination supports signatures
Writing manifest to image destination
Storing signatures
STEP 2/13: WORKDIR /app
--> 31c518f1d2f2
STEP 3/13: RUN dnf -y update && dnf install -y iputils net-tools wget vim-minimal python3.11 python3.11-pip python3.11-wheel python3.11-setuptools && ln -s /bin/pip3.11 /bin/pip && ln -s /bin/python3.11 /bin/python && dnf clean all
Not root, Subscription Management repositories not updated
**Error: This command has to be run with superuser privileges (under the root user on most systems).**
Error: building at STEP "RUN dnf -y update && dnf install -y iputils net-tools wget vim-minimal python3.11 python3.11-pip python3.11-wheel python3.11-setuptools && ln -s /bin/pip3.11 /bin/pip && ln -s /bin/python3.11 /bin/python && dnf clean all": while running runtime: exit status 1
Expected behavior
The build should be successful for ubi9/* base images without any permission errors.