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

Unable to build image locally #84

Open
paulelvers opened this issue Aug 19, 2021 · 1 comment
Open

Unable to build image locally #84

paulelvers opened this issue Aug 19, 2021 · 1 comment

Comments

@paulelvers
Copy link

paulelvers commented Aug 19, 2021

After following the instructions from the readme I get the following error message:

➜ sagemaker-scikit-learn-container git:(master) docker build -t preprod-sklearn:0.23-1-cpu-py3 -f docker/0.23-1/final/Dockerfile.cpu .
[+] Building 1.5s (3/3) FINISHED
=> [internal] load build definition from Dockerfile.cpu 0.0s
=> => transferring dockerfile: 41B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 34B 0.0s
=> ERROR [internal] load metadata for docker.io/library/sklearn-base:0.23-1-cpu-py3 1.4s
[internal] load metadata for docker.io/library/sklearn-base:0.23-1-cpu-py3:
failed to solve with frontend dockerfile.v0: failed to create LLB definition: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed

Docker

Docker version 20.10.7, build f0df350

OS

MacOS Big Sur 11.4
Apple M1

@mabunday
Copy link
Contributor

mabunday commented Aug 8, 2022

This is the process I followed on my Mac:

git checkout 0.23-1
conda create -n sklearn-0.23-1 python=3.7.10
conda activate sklearn-0.23-1
docker build -t sklearn-base:0.23-1-cpu-py3 -f docker/0.23-1/base/Dockerfile.cpu .

At this point, running docker images gave

REPOSITORY     TAG               IMAGE ID       CREATED         SIZE
sklearn-base   0.23-1-cpu-py3   bf35a39b6f84   3 minutes ago   3.7GB

and I was able to run docker build -t preprod-sklearn:0.23-1-cpu-py3 -f docker/0.23-1/final/Dockerfile.cpu . successfully.

docker images
>>> REPOSITORY        TAG               IMAGE ID       CREATED              SIZE
>>> preprod-sklearn   0.23-1-cpu-py3    41215ffa2fe2   About a minute ago   4.22GB
>>> sklearn-base      0.23-1-cpu-py3    bf35a39b6f84   7 minutes ago        3.7GB

The error message may occur if the base image isn't named correctly, in which case docker will look for a remote image and fail to find it.

Let me know if you're still running into this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants