opendatahub-io-contrib / workbench-images

Various custom Workbenches and Runtimes for Open Data Hub and OpenShift Data Science
MIT License
35 stars 23 forks source link

requested access to the resource is denied, interactive-image-builder.sh #50

Open pandeybk opened 7 months ago

pandeybk commented 7 months ago

I am seeing the following error, when I try to build the image.

127.0.0.1 $ podman build -t workbench-images:jupyter-pytorch-c9s-py311_2023c_20240110 .
STEP 1/25: FROM workbench-images:base-c9s-py311_2023c_20240110
Resolving "workbench-images" using unqualified-search registries (/etc/containers/registries.conf.d/999-podman-machine.conf)
Trying to pull docker.io/library/workbench-images:base-c9s-py311_2023c_20240110...
Error: creating build container: initializing source docker://workbench-images:base-c9s-py311_2023c_20240110: reading manifest base-c9s-py311_2023c_20240110 in docker.io/library/workbench-images: requested access to the resource is denied

which looks valid error because the base image doesn't exist. Here is the content of the produced Containerfile.

FROM workbench-images:base-c9s-py311_2023c_20240110

LABEL name="workbench-images:jupyter-pytorch-c9s-py311_2023c_20240110" \
    summary="jupyter-pytorch workbench image with Python py311 based on c9s" \
    description="jupyter-pytorch workbench image with Python py311 based on c9s" \
    io.k8s.description="jupyter-pytorch workbench image  with Python py311 based on c9s for ODH or RHODS" \
    io.k8s.display-name="jupyter-pytorch workbench image  with Python py311 based on c9s" \
    authoritative-source-url="https://github.com/opendatahub-contrib/workbench-images" \
    io.openshift.build.commit.ref="2023c" \
    io.openshift.build.source-location="https://github.com/opendatahub-contrib/workbench-images" \
    io.openshift.build.image="https://quay.io/opendatahub-contrib/workbench-images:jupyter-pytorch-c9s-py311_2023c_20240110"

...

I have been using the default selection while running interactive-image-builder.sh. My expectation is for the script to generate a runnable Containerfile. Is this the correct approach, or should I be using a different base image?

shalberd commented 6 months ago

I think it boils down to the base image, as you correctly mentioned.

You have to type in 20230910, not the default selection current date, in order to get the latest available base image, which has been 5 months ago ...

Bildschirmfoto 2024-02-07 um 07 51 42

or build the base image locally with the right date tag

https://github.com/opendatahub-io-contrib/workbench-images/blob/main/base/Makefile

build locally with podman a base image with the correct date and release name you want (an example from my recent endeavor):

$ pwd
/Users/x/GitHub/workbench-images/base

@pandeybk Do the following from the base folder and you'll see the images will be visible with podman images afterwards locally. What is important during interactive image builder is that you always use the latest date and release name of your base image when i.e building Jupyter or runtime images with interactive image builder.

make all RELEASE=2024a DATE=20240513

after that, the interactive image builder process as you want it works. Let us know here if it worked and close the issue then.

@guimou the user is right, the fact that, if not present locally, the last base image is from 20230910, is a bit confusing in terms of interactive image builder flow and containerfile reference.