Skip to content
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

Can't build notebook images locally #7587

Closed
kimwnasptd opened this issue May 25, 2024 · 2 comments
Closed

Can't build notebook images locally #7587

kimwnasptd opened this issue May 25, 2024 · 2 comments
Labels

Comments

@kimwnasptd
Copy link
Member

/kind bug

What steps did you take and what happened:
After trying to debug why the image builds failed in https://github.com/kubeflow/kubeflow/actions/runs/9216437170/job/25407648295 I tried to build the images locally to try and reproduce the error.

But I can't build the images locally and get the following error:

$ make docker-build-multi-arch--jupyter-tensorflow
make docker-build-multi-arch -C jupyter-tensorflow
make[1]: Entering directory '/home/ubuntu/Code/git/kubeflow/components/example-notebook-servers/jupyter-tensorflow'



------------------------------------------------------------------------------
Building 'jupyter-tensorflow' image for 'linux/amd64'...
------------------------------------------------------------------------------

docker buildx build --load --platform linux/amd64 --build-arg BASE_IMG=docker.io/kubeflownotebookswg/jupyter:sha-8869f221655b1de52b8298d29170ee0d06a46500 --progress=plain --cache-from type=registry,ref=ghcr.io/kubeflow/kubeflow/notebook-servers/build-cache:jupyter-tensorflow --tag "docker.io/kubeflownotebookswg/jupyter-tensorflow:sha-8869f221655b1de52b8298d29170ee0d06a46500" -f Dockerfile .
#0 building with "silly_ardinghelli" instance using docker-container driver

#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 501B done
#1 DONE 0.0s

#2 [internal] load metadata for docker.io/kubeflownotebookswg/jupyter:sha-8869f221655b1de52b8298d29170ee0d06a46500
#2 ERROR: docker.io/kubeflownotebookswg/jupyter:sha-8869f221655b1de52b8298d29170ee0d06a46500: not found
------
 > [internal] load metadata for docker.io/kubeflownotebookswg/jupyter:sha-8869f221655b1de52b8298d29170ee0d06a46500:
------
Dockerfile:6
--------------------
   4 |
   5 |     ARG BASE_IMG=<jupyter>
   6 | >>> FROM $BASE_IMG
   7 |
   8 |     # args - software versions
--------------------
ERROR: failed to solve: docker.io/kubeflownotebookswg/jupyter:sha-8869f221655b1de52b8298d29170ee0d06a46500: failed to resolve source metadata for docker.io/kubeflownotebookswg/jupyter:sha-8869f221655b1de52b8298d29170ee0d06a46500: docker.io/kubeflownotebookswg/jupyter:sha-8869f221655b1de52b8298d29170ee0d06a46500: not found
make[1]: *** [../common.mk:88: docker-build-multi-arch] Error 1
make[1]: Leaving directory '/home/ubuntu/Code/git/kubeflow/components/example-notebook-servers/jupyter-tensorflow'
make: *** [Makefile:41: docker-build-multi-arch--jupyter-tensorflow] Error 2

I then tried to build all the images, in case I'm missing something with the dependencies, but got a similar error for the codeserver image

$ make docker-build-multi-arch
make docker-build-multi-arch -C base
make[1]: Entering directory '/home/ubuntu/Code/git/kubeflow/components/example-notebook-servers/base'



------------------------------------------------------------------------------
Building 'base' image for 'linux/amd64'...
------------------------------------------------------------------------------

...
...

------------------------------------------------------------------------------
Building 'codeserver' image for 'linux/amd64'...
------------------------------------------------------------------------------

docker buildx build --load --platform linux/amd64 --build-arg BASE_IMG=docker.io/kubeflownotebookswg/base:sha-8869f221655b1de52b8298d29170ee0d06a46500 --progress=plain --cache-from type=registry,ref=ghcr.io/kubeflow/kubeflow/notebook-servers/build-cache:codeserver --tag "docker.io/kubeflownotebookswg/codeserver:sha-8869f221655b1de52b8298d29170ee0d06a46500" -f Dockerfile .
#0 building with "silly_ardinghelli" instance using docker-container driver

#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 706B done
#1 DONE 0.0s

#2 [internal] load metadata for docker.io/kubeflownotebookswg/base:sha-8869f221655b1de52b8298d29170ee0d06a46500
#2 ERROR: docker.io/kubeflownotebookswg/base:sha-8869f221655b1de52b8298d29170ee0d06a46500: not found
------
 > [internal] load metadata for docker.io/kubeflownotebookswg/base:sha-8869f221655b1de52b8298d29170ee0d06a46500:
------
Dockerfile:6
--------------------
   4 |
   5 |     ARG BASE_IMG=<base>
   6 | >>> FROM $BASE_IMG
   7 |
   8 |     ARG TARGETARCH
--------------------
ERROR: failed to solve: docker.io/kubeflownotebookswg/base:sha-8869f221655b1de52b8298d29170ee0d06a46500: failed to resolve source metadata for docker.io/kubeflownotebookswg/base:sha-8869f221655b1de52b8298d29170ee0d06a46500: docker.io/kubeflownotebookswg/base:sha-8869f221655b1de52b8298d29170ee0d06a46500: not found
make[1]: *** [../common.mk:88: docker-build-multi-arch] Error 1
make[1]: Leaving directory '/home/ubuntu/Code/git/kubeflow/components/example-notebook-servers/codeserver'
make: *** [Makefile:41: docker-build-multi-arch--codeserver] Error 2

What did you expect to happen:
To be able to build the images locally

Environment:

  • Kubeflow version: master (pre 1.9 rc0)

cc @thesuperzapper

@thesuperzapper
Copy link
Member

@kimwnasptd you are running the wrong make command.

The correct command to build (with dependencies) is to cd into the folder of the image you want to build and run one of the following:

  • Local Arch: make docker-build-dep
  • Multi Arch: make docker-build-multi-arch-dep

You can also build ALL images by running the following commands from the ./components/example-notebook-servers/ folder:

  • Local Arch: make docker-build
  • Multi-Arch: make docker-build-multi-arch

Also, if you want to push to a test registry, you can run export REGISTRY="docker.io/MY_DOCKER_ACCOUNT" (or any other registry) before running the "build" commands, then you can run the corresponding "push" command:

  • Single Image (+ Deps)
    • Local Arch: make docker-push-dep
    • Multi-Arch: make docker-build-push-multi-arch-dep (note, this also builds)
  • All Images:
    • Local Arch: make docker-push
    • Multi-Arch: make docker-build-multi-arch (note, this also builds)

@thesuperzapper
Copy link
Member

Needs Triage automation moved this from To Do to Closed May 29, 2024
@kubeflow-bot kubeflow-bot removed this from Closed in Needs Triage May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants