![]() … 25 minutes, 57 seconds! And the resulting image is 851MB. RUN pip install -no-cache-dir matplotlib pandas In this case, to figure out the dependencies I did some research, and ended up with the following updated Dockerfile:įROM python:3.8-alpine RUN apk -update add gcc build-base freetype-dev libpng-dev openblas-dev Which also means you need to figure out every single system library dependency yourself. Most Python packages these days include binary wheels on PyPI, significantly speeding install time.īut if you’re using Alpine Linux you need to compile all the C code in every Python package that you use. Most Linux distributions use the GNU version ( glibc) of the standard C library that is required by pretty much every C program, including Python.īut Alpine Linux uses musl, those binary wheels are compiled against glibc, and therefore Alpine disabled Linux wheel support. If you look at the Debian-based build above, you’ll see it’s downloading matplotlib-3.1.2-cp38-cp38-manylinux1_x86_64.whl.Īlpine, in contrast, downloads the source code ( matplotlib-3.1.2.tar.gz), because standard Linux wheels don’t work on Alpine Linux. What’s going on? Standard PyPI wheels don’t work on Alpine The command '/bin/sh -c pip install matplotlib pandas' returned a non-zero code: 1 Tmp/pip-install-a3olrixa/matplotlib/setup.py'"'"' _file_='" '"'/tmp/pip-install-a3olrixa/matplotlib/setup.py '"' "' f=getattr(tokenize, '" '"'open '"' "', open)(_file_) code=f.read().replace('" '"' \r\n '"' "', '" '"' \n '"' "') f.close() exec(compile(code, _file_, '" '"' exec '"' "'))' egg_info -egg-base /tmp/pip-install-a3olrixa/matplotlib/pip-egg-infoĮRROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. Step 2/2 : RUN pip install -no-cache-dir matplotlib pandasĭownloading matplotlib-3.1.2.tar.gz (40.9 MB)ĮRROR: Command errored out with exit status 1:Ĭommand: /usr/local/bin/python -c 'import sys, setuptools, tokenize sys.argv = '"' "'/ Sending build context to Docker daemon 3.072kB $ docker build -t python-matpan-alpine -f Dockerfile.alpine.
0 Comments
Leave a Reply. |