Hello, everyone. I am new to docker. I want to build a image for my project which contains both python and java. Here is my Dockerfile:
FROM python:2.7.15-alpine3.8
# update gcc
RUN apk add --update curl gcc g++ \
&& rm -rf /var/cache/apk/*
# install java
RUN apk update \
&& apk upgrade \
&& apk add --no-cache bash \
&& apk add --no-cache --virtual=build-dependencies unzip \
&& apk add --no-cache curl \
&& apk add --no-cache openjdk7-jre
# install python modules
COPY requirements.txt /health_pipeline/
RUN pip install --upgrade pip && pip install -U setuptools && pip install --no-cache-dir -r /health_pipeline/requirements.txt
# My project python scripts
COPY AnlzRpt/ /health_pipeline/
CMD ["bash"]
Here is my requirements.txt:
scipy
pathlib
python-docx
pandas
mysql-connector-python==8.0.12
Here is error:
FROM python:2.7.15-alpine3.8
config.add_subpackage('scipy')
in add_subpackage
File "/tmp/pip-install-q4gIpE/scipy/setup.py", line 470, in setup_package
setup(**metadata) File "/usr/local/lib/python2.7/site-packages/numpy/distutils/core.py", line 135, in setup
config = configuration()
File "/tmp/pip-install-q4gIpE/scipy/setup.py", line 388, in configuration config.add_subpackage('scipy')
File "/usr/local/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 1037, in add_subpackage
caller_level = 2)
File "/usr/local/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 1006, in get_subpackage
caller_level = caller_level + 1) File "/usr/local/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 943, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "scipy/setup.py", line 15, in configuration config.add_subpackage('linalg')
File "/usr/local/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 1037, in add_subpackage
caller_level = 2) File "/usr/local/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 1006, in get_subpackage
caller_level = caller_level + 1)
File "/usr/local/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 943, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "scipy/linalg/setup.py", line 19, in configuration
raise NotFoundError('no lapack/blas resources found')
numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
----------------------------------------
Command "/usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-q4gIpE/scipy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-6DYG0j/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-q4gIpE/scipy/
The command '/bin/sh -c pip install --upgrade pip && pip install -U setuptools && pip install --no-cache-dir -r /health_pipeline/requirements.txt' returned a non-zero code: 1
I don’t know why this won’t work and how to fix it. I hope I can get some help here, thanks!