DedSecInside / TorBot

Dark Web OSINT Tool
Other
2.75k stars 510 forks source link

Build docker failed on installing scipy #241

Closed lsntdev closed 2 years ago

lsntdev commented 2 years ago

Describe the bug Build image using docker failed to install scipy

To Reproduce Steps to reproduce the behavior:

  1. git clone [repo] && cd [repo]
  2. docker build -f docker/Dockerfile -t dedsecinside/torbot .
  3. See error
    
    Step 8/11 : RUN python -m poetry install --no-dev
    ---> Running in 45348f9c8afc
    Skipping virtualenv creation, as specified in config file.
    Installing dependencies from lock file

Package operations: 23 installs, 3 updates, 4 removals

• Removing importlib-metadata (4.8.1) • Removing packaging (21.0) • Removing pyparsing (2.4.7) • Removing zipp (3.6.0) • Updating charset-normalizer (2.0.12 -> 2.0.7) • Installing numpy (1.21.1) • Updating urllib3 (1.26.8 -> 1.26.7) • Installing altgraph (0.17.2) • Installing decorator (5.1.0) • Installing pyinstaller-hooks-contrib (2021.3) • Installing pyqt5-qt5 (5.15.2) • Installing pyqt5-sip (12.9.0) • Updating requests (2.27.1 -> 2.26.0) • Installing scipy (1.6.1) • Installing joblib (1.1.0) • Installing soupsieve (2.2.1) • Installing threadpoolctl (3.0.0)

EnvCommandError

Command ['/usr/local/bin/python', '-m', 'pip', 'install', '--no-deps', '/root/.cache/pypoetry/artifacts/e9/68/41/4d3c891e2bc311b2eadfc22e9eae1cd66b2045675db9fbce0666631c7c/scipy-1.6.1.tar.gz'] errored with the following return code 1, and output: Processing /root/.cache/pypoetry/artifacts/e9/68/41/4d3c891e2bc311b2eadfc22e9eae1cd66b2045675db9fbce0666631c7c/scipy-1.6.1.tar.gz Installing build dependencies: started Installing build dependencies: still running... Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing wheel metadata: started Preparing wheel metadata: finished with status 'error' ERROR: Command errored out with exit status 1: command: /usr/local/bin/python /usr/local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp61fl1bbr cwd: /tmp/pip-req-build-fcccdej8 Complete output (104 lines): setup.py:461: UserWarning: Unrecognized setuptools command ('dist_info --egg-base /tmp/pip-modern-metadata-6w7iwb3u'), proceeding with generating Cython sources and expanding templates warnings.warn("Unrecognized setuptools command ('{}'), proceeding with " Running from SciPy source directory. INFO: lapack_opt_info: INFO: lapack_armpl_info: INFO: customize UnixCCompiler INFO: libraries armpl_lp64_mp not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu'] INFO: NOT AVAILABLE INFO: INFO: lapack_mkl_info: INFO: libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu'] INFO: NOT AVAILABLE INFO: INFO: openblas_lapack_info: INFO: libraries openblas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu'] INFO: NOT AVAILABLE INFO: INFO: openblas_clapack_info: INFO: libraries openblas,lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu'] INFO: NOT AVAILABLE INFO: INFO: flame_info: INFO: libraries flame not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu'] INFO: NOT AVAILABLE INFO: INFO: accelerate_info: INFO: NOT AVAILABLE INFO: INFO: atlas_3_10_threads_info: INFO: Setting PTATLAS=ATLAS INFO: libraries tatlas,tatlas not found in /usr/local/lib INFO: libraries tatlas,tatlas not found in /usr/lib INFO: libraries tatlas,tatlas not found in /usr/lib/x86_64-linux-gnu INFO: <class 'numpy.distutils.system_info.atlas_3_10_threads_info'> INFO: NOT AVAILABLE INFO: INFO: atlas_3_10_info: INFO: libraries satlas,satlas not found in /usr/local/lib INFO: libraries satlas,satlas not found in /usr/lib INFO: libraries satlas,satlas not found in /usr/lib/x86_64-linux-gnu INFO: <class 'numpy.distutils.system_info.atlas_3_10_info'> INFO: NOT AVAILABLE INFO: INFO: atlas_threads_info: INFO: Setting PTATLAS=ATLAS INFO: libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib INFO: libraries ptf77blas,ptcblas,atlas not found in /usr/lib INFO: libraries ptf77blas,ptcblas,atlas not found in /usr/lib/x86_64-linux-gnu INFO: <class 'numpy.distutils.system_info.atlas_threads_info'> INFO: NOT AVAILABLE INFO: INFO: atlas_info: INFO: libraries f77blas,cblas,atlas not found in /usr/local/lib INFO: libraries f77blas,cblas,atlas not found in /usr/lib INFO: libraries f77blas,cblas,atlas not found in /usr/lib/x86_64-linux-gnu INFO: <class 'numpy.distutils.system_info.atlas_info'> INFO: NOT AVAILABLE INFO: INFO: lapack_info: INFO: libraries lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu'] INFO: NOT AVAILABLE INFO: /tmp/pip-build-env-dnk3gymg/overlay/lib/python3.10/site-packages/numpy/distutils/system_info.py:1902: UserWarning: Lapack (http://www.netlib.org/lapack/) libraries not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [lapack]) or by setting the LAPACK environment variable. return getattr(self, '_calcinfo{}'.format(name))() INFO: lapack_src_info: INFO: NOT AVAILABLE INFO: /tmp/pip-build-env-dnk3gymg/overlay/lib/python3.10/site-packages/numpy/distutils/system_info.py:1902: UserWarning: Lapack (http://www.netlib.org/lapack/) sources not found. Directories to search for the sources can be specified in the numpy/distutils/site.cfg file (section [lapack_src]) or by setting the LAPACK_SRC environment variable. return getattr(self, '_calcinfo{}'.format(name))() INFO: NOT AVAILABLE INFO: Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 349, in main() File "/usr/local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 331, in main json_out['return_val'] = hook(hook_input['kwargs']) File "/usr/local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 151, in prepare_metadata_for_build_wheel return hook(metadata_directory, config_settings) File "/tmp/pip-build-env-dnk3gymg/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 161, in prepare_metadata_for_build_wheel self.run_setup() File "/tmp/pip-build-env-dnk3gymg/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 253, in run_setup super(_BuildMetaLegacyBackend, File "/tmp/pip-build-env-dnk3gymg/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 145, in run_setup exec(compile(code, file, 'exec'), locals()) File "setup.py", line 588, in setup_package() File "setup.py", line 584, in setup_package setup(metadata) File "/tmp/pip-build-env-dnk3gymg/overlay/lib/python3.10/site-packages/numpy/distutils/core.py", line 135, in setup config = configuration() File "setup.py", line 499, in configuration raise NotFoundError(msg) numpy.distutils.system_info.NotFoundError: No BLAS/LAPACK libraries found. To build Scipy from sources, BLAS & LAPACK libraries need to be installed. See site.cfg.example in the Scipy source directory and https://docs.scipy.org/doc/scipy/reference/building/index.html for details.

WARNING: Discarding file:///root/.cache/pypoetry/artifacts/e9/68/41/4d3c891e2bc311b2eadfc22e9eae1cd66b2045675db9fbce0666631c7c/scipy-1.6.1.tar.gz. Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp61fl1bbr Check the logs for full command output. ERROR: Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp61fl1bbr Check the logs for full command output. WARNING: You are using pip version 21.2.4; however, version 22.0.4 is available. You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.

at /usr/local/lib/python3.10/site-packages/poetry/utils/env.py:1195 in _run 1191│ output = subprocess.checkoutput( 1192│ cmd, stderr=subprocess.STDOUT, **kwargs 1193│ ) 1194│ except CalledProcessError as e: → 1195│ raise EnvCommandError(e, input=input) 1196│ 1197│ return decode(output) 1198│ 1199│ def execute(self, bin, *args, **kwargs):

The command '/bin/sh -c python -m poetry install --no-dev' returned a non-zero code: 1



**Expected behavior**
Docker image build finish.

**Screenshots**
I already paste the error.
KingAkeem commented 2 years ago

I'd suggest not using docker and running the project directly if possible.