Hello,
Docker build fails in 50% of cases (during pipenv install), failure example:
1st run with error:
Step 14/21 : RUN pipenv install --system --skip-lock && python3 -m nltk.downloader stopwords punkt wordnet && python3 -m spacy download en_core_web_md ---> Running in fe6765bc92b9 Installing dependencies from Pipfile… Traceback (most recent call last): File "/usr/local/lib/python3.6/runpy.py", line 183, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/usr/local/lib/python3.6/runpy.py", line 109, in _get_module_details __import__(pkg_name) File "/usr/local/lib/python3.6/site-packages/nltk/__init__.py", line 129, in <module> from nltk.collocations import * File "/usr/local/lib/python3.6/site-packages/nltk/collocations.py", line 40, in <module> from nltk.metrics import ContingencyMeasures, BigramAssocMeasures, TrigramAssocMeasures File "/usr/local/lib/python3.6/site-packages/nltk/metrics/__init__.py", line 16, in <module> from nltk.metrics.scores import ( File "/usr/local/lib/python3.6/site-packages/nltk/metrics/scores.py", line 18, in <module> from scipy.stats.stats import betai File "/usr/local/lib/python3.6/site-packages/scipy/__init__.py", line 61, in <module> from numpy import show_config as show_numpy_config File "/usr/local/lib/python3.6/site-packages/numpy/__init__.py", line 151, in <module> from . import random File "/usr/local/lib/python3.6/site-packages/numpy/random/__init__.py", line 179, in <module> from . import _pickle File "/usr/local/lib/python3.6/site-packages/numpy/random/_pickle.py", line 1, in <module> from .mtrand import RandomState File "mtrand.pyx", line 1, in init numpy.random.mtrand File "bit_generator.pyx", line 404, in init numpy.random.bit_generator TypeError: 'errstate' object is not callable
2nd run with error:
Step 14/21 : RUN pipenv install --system --skip-lock && python3 -m nltk.downloader stopwords punkt wordnet && python3 -m spacy download en_core_web_md ---> Running in 77a7ad3ca006 Installing dependencies from Pipfile… /usr/local/lib/python3.6/runpy.py:125: RuntimeWarning: 'nltk.downloader' found in sys.modules after import of package 'nltk', but prior to execution of 'nltk.downloader'; this may result in unpredictable behaviour warn(RuntimeWarning(msg)) [nltk_data] Downloading package stopwords to /root/nltk_data... [nltk_data] Unzipping corpora/stopwords.zip. [nltk_data] Downloading package punkt to /root/nltk_data... [nltk_data] Unzipping tokenizers/punkt.zip. [nltk_data] Downloading package wordnet to /root/nltk_data... [nltk_data] Unzipping corpora/wordnet.zip. Traceback (most recent call last): File "/usr/local/lib/python3.6/runpy.py", line 183, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/usr/local/lib/python3.6/runpy.py", line 142, in _get_module_details return _get_module_details(pkg_main_name, error) File "/usr/local/lib/python3.6/runpy.py", line 109, in _get_module_details __import__(pkg_name) File "/usr/local/lib/python3.6/site-packages/spacy/__init__.py", line 10, in <module> from thinc.neural.util import prefer_gpu, require_gpu File "/usr/local/lib/python3.6/site-packages/thinc/__init__.py", line 5, in <module> import numpy # noqa: F401 File "/usr/local/lib/python3.6/site-packages/numpy/__init__.py", line 140, in <module> from . import core File "/usr/local/lib/python3.6/site-packages/numpy/core/__init__.py", line 59, in <module> from . import numeric File "/usr/local/lib/python3.6/site-packages/numpy/core/numeric.py", line 18, in <module> from .multiarray import ( ImportError: cannot import name 'int_asbuffer'
3rd run without errors;
There is no error with a local build, about half of the cases are successful, another half I need to rebuild workflow twice to create the image.
Can somebody suggest something?