-
-
Save pythoninthegrass/789ed55097035406fb7d6916a7b3c618 to your computer and use it in GitHub Desktop.
Installing numpy, scipy, pandas and matplotlib in Alpine (Docker)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Below are the dependencies required for installing the common combination of numpy, scipy, pandas and matplotlib | |
# in an Alpine based Docker image. | |
ARG VERSION=3.18 | |
FROM alpine:${VERSION} | |
RUN apk update \ | |
&& apk add \ | |
--no-cache \ | |
--repository http://dl-cdn.alpinelinux.org/x86_64/edge/community \ | |
build-base \ | |
curl \ | |
freetype-dev \ | |
gcc \ | |
gfortran \ | |
libpng-dev \ | |
openblas-dev \ | |
python3 \ | |
python3-dev \ | |
py3-pip \ | |
py3-pandas \ | |
py3-numpy \ | |
wget | |
RUN ln -s /usr/include/locale.h /usr/include/xlocale.h | |
ENV PIP_DISABLE_PIP_VERSION_CHECK=on | |
ENV PIP_DEFAULT_TIMEOUT=100 | |
RUN --mount=type=cache,target=/root/.cache/pip \ | |
--mount=type=bind,source=./requirements.txt,target=/app/requirements.txt \ | |
python -m pip install --only-binary=1 numpy scipy pandas matplotlib | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment