apk add cmake> 3.12-суффикс не работает на alpine docker - PullRequest
0 голосов
/ 01 апреля 2020

Я пытаюсь установить Xgboost на Alpine docker

Я получал это сообщение:

   CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  CMake 3.12 or higher is required.  You are running version 3.9.5

, затем я добавил следующую строку перед

RUN apk add cmake>3.12-suffix
# RUN pip install cmake
RUN pip3 install xgboost

и я все еще получаю следующее сообщение об ошибке. Что я делаю не так?

    > Step 16/21 : RUN apk add cmake>3.12-suffix
     ---> Using cache
     ---> da84d6ee0868
    Step 17/21 : RUN pip3 install xgboost
     ---> Running in c8e77045ea59
    Collecting xgboost
      Downloading xgboost-1.0.2.tar.gz (821 kB)
        ERROR: Command errored out with exit status 1:
         command: /usr/bin/python3.6 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9m5q6l5k/xgboost/setup.py'"'"';
__file__='"'"'/tmp/pip-install-9m5q6l5k/xgboost/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-9m5q6l5k/xgboost/pip-egg-info
             cwd: /tmp/pip-install-9m5q6l5k/xgboost/
        Complete output (35 lines):
        + pwd
        + oldpath=/tmp/pip-install-9m5q6l5k/xgboost
        + cd ./xgboost/
        + mkdir -p build
        + cd build
        + cmake ..
        CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
          CMake 3.12 or higher is required.  You are running version 3.9.5


        -- Configuring incomplete, errors occurred!
        + echo -----------------------------
        -----------------------------
        + echo Building multi-thread xgboost failed
        Building multi-thread xgboost failed
        + echo Start to build single-thread xgboost
        Start to build single-thread xgboost
        + cmake .. -DUSE_OPENMP=0
        CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
          CMake 3.12 or higher is required.  You are running version 3.9.5


        -- Configuring incomplete, errors occurred!
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/tmp/pip-install-9m5q6l5k/xgboost/setup.py", line 42, in <module>
            LIB_PATH = libpath['find_lib_path']()
          File "/tmp/pip-install-9m5q6l5k/xgboost/xgboost/libpath.py", line 50, in find_lib_path
            'List of candidates:\n' + ('\n'.join(dll_path)))
        XGBoostLibraryNotFound: Cannot find XGBoost Library in the candidate path, did you install compilers and run build.sh in root path?
        List of candidates:
        /tmp/pip-install-9m5q6l5k/xgboost/xgboost/libxgboost.so
        /tmp/pip-install-9m5q6l5k/xgboost/xgboost/../../lib/libxgboost.so
        /tmp/pip-install-9m5q6l5k/xgboost/xgboost/./lib/libxgboost.so
        /usr/xgboost/libxgboost.so
        ----------------------------------------
    ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
...