aws / sagemaker-sparkml-serving-container

This code is used to build & run a Docker container for performing predictions against a Spark ML Pipeline.
Apache License 2.0
52 stars 25 forks source link

Running Docker build fails at Python installation step #25

Open mabel91 opened 3 years ago

mabel91 commented 3 years ago

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: E: Unable to locate package python3.6 E: Couldn't find any package by glob 'python3.6' The 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

hanwang-work commented 3 years ago

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.