'Docker build issues with python and data science packages
Relatively new to docker (building and creating) and I am running into an issue when I attempt to build a docker image with data science packages. The process seems to error out on python selection but I'm not sure why. I have my docker file (Dockerfile) in the directory root where I am attempting to build. It makes it through the build process to some degree and then fails:
------
> [3/3] RUN apk add --no-cache --virtual build-dependencies python --update py-pip && apk add --virtual build-runtime build-base python-dev openblas-dev freetype-dev pkgconfig gfortran && ln -s /usr/include/locale.h /usr/include/xlocale.h && pip install --upgrade pip && pip install --no-cache-dir numpy matplotlib scipy scikit-learn pandas nltk wordcloud && apk del build-runtime && apk add --no-cache --virtual build-dependencies dumb-init musl libc6-compat linux-headers build-base bash git ca-certificates freetype libgfortran libgcc libstdc++ openblas tcl tk libssl1.0 && rm -rf /var/cache/apk/*:
#6 0.159 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/aarch64/APKINDEX.tar.gz
#6 0.742 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/aarch64/APKINDEX.tar.gz
#6 1.008 ERROR: unable to select packages:
#6 1.021 python (no such package):
#6 1.021 required by: build-dependencies-20220407.173111[python]
------
executor failed running [/bin/sh -c apk add --no-cache --virtual build-dependencies python --update py-pip && apk add --virtual build-runtime build-base python-dev openblas-dev freetype-dev pkgconfig gfortran && ln -s /usr/include/locale.h /usr/include/xlocale.h && pip install --upgrade pip && pip install --no-cache-dir $PYTHON_PACKAGES && apk del build-runtime && apk add --no-cache --virtual build-dependencies $PACKAGES && rm -rf /var/cache/apk/*]: exit code: 2
(base) tdentry@VONFVFGG5STQ05N kaggle_assignment % docker build -t tdentryr/python-datascience:3.9 -f Dockerfile .
Any ideas on why this might be failing?
Solution 1:[1]
- It would nice if posted a valid Dockerfile
- The error is: python (no such package), I would try to identify which package is missing using a process of elimination and then figure out why it's missing.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Frank |
