sagemaker-sparkml-serving-container icon indicating copy to clipboard operation
sagemaker-sparkml-serving-container copied to clipboard

Running Docker build fails at Python installation step

Open mabel91 opened this issue 4 years ago • 1 comments

Hi, I am trying to build the docker image in this repository, and the build fails at - Step 6/20 : RUN apt -y install python3.6 Due to compliance and security restrictions at my organization, we cannot use publicly available containers in ECR provided by Amazon for our project. Error message: [91mE: Unable to locate package python3.6 E: Couldn't find any package by glob 'python3.6' [0mThe command '/bin/sh -c apt -y install python3.6' returned a non-zero code: 100

Attached is the complete log for the docker build step, could you please guide me as to why apt is not able to find Python? There is an apt update also done before this step log.txt

TIA, Manasi

mabel91 avatar Sep 16 '21 08:09 mabel91

This seems to be because of changes in the latest version of openjdk:8 that gets picked up by the Dockerfile. It seems like the install of the latest version of openjdk:8 no longer also installs make, gcc, zlib1g-dev or libpython3.7. Two short-term solutions seem to work for us:

Solution 1

Install make, gcc and zlib1g-dev Delete auto-remove libpython3.7

Solution 2

Lock openjdk:8 to a specific version e.g.: FROM openjdk:8@sha256:146ab549512e7520f01b1c1016c83aac76f43222d86eef758003b386cc8e6d5a

I think that a rebuild today of the master branch that was last built several months ago would fail with this issue.

hanwang-work avatar Sep 28 '21 15:09 hanwang-work