Как мне скомпилировать Plaidml для Raspberry Pi 4 - PullRequest
0 голосов
/ 21 сентября 2019

Я хочу установить plaidml на свой rbpi4.pip install plaidml возвращает: «не найден соответствующий дистрибутив для plaidml». Поэтому я попытался скомпилировать plaidml на моем pi, но я не могу собрать его без conda, который недоступен для arm (и не может быть собран, потому что он закрытисточник).Скрипт configure python говорит мне установить conda:

[outeh@outeh-pi plaidml-master]$ python configure 
Configuring PlaidML build environment
Please install conda.
See: https://docs.conda.io/projects/conda/en/latest/user-guide/install

Я также безуспешно пытался установить сборку miniconda для pi3 (http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-armv7l.sh)

Сборка пледмл напрямую с bazel не работаетпотому что в bazel.rc определены только цели x86_64 (https://raw.githubusercontent.com/plaidml/plaidml/master/bzl/bazel.rc). и даже если я добавлю цель aarch64 к bazel.rc

build:linux_aarch64 --cpu=linux_aarch64
build:linux_aarch64 --crosstool_top=//toolchain:toolchain
build:linux_aarch64 --host_crosstool_top=//toolchain:toolchain
build:linux_aarch64 --build_tag_filters=-darwin,-metal,-msvc,-pytorch
test:linux_aarch64 --test_tag_filters=-darwin,-metal,-msvc,-pytorch

Она не собирается, потому что может 'не найти conda в conda_wrapper.py (https://raw.githubusercontent.com/plaidml/plaidml/master/bzl/conda_wrapper.py)

[outeh@outeh-pi plaidml-master]$ bazel build --config linux_aarch64 plaidml:wheel plaidml/keras:wheel
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=80
INFO: Reading rc options for 'build' from /home/outeh/Schreibtisch/plaidml-master/bzl/bazel.rc:
  'build' options: -c opt --spawn_strategy=standalone --genrule_strategy=standalone --announce_rc --distinct_host_configuration=false --action_env=LC_ALL --action_env=LANG --action_env=NO_PROXY --action_env=HTTP_PROXY --action_env=HTTPS_PROXY --action_env=no_proxy --action_env=http_proxy --action_env=https_proxy --define=version=0.0.0.dev0
INFO: Found applicable config definition build:linux_aarch64 in file /home/outeh/Schreibtisch/plaidml-master/bzl/bazel.rc: --cpu=linux_aarch64 --crosstool_top=//toolchain:toolchain --host_crosstool_top=//toolchain:toolchain --build_tag_filters=-darwin,-metal,-msvc,-pytorch
Traceback (most recent call last):
  File "/home/outeh/Schreibtisch/plaidml-master/bzl/conda_wrapper.py", line 225, in <module>
    main()
  File "/home/outeh/Schreibtisch/plaidml-master/bzl/conda_wrapper.py", line 218, in main
    subprocess.check_call(['conda'] + sys.argv[1:])
  File "/usr/lib/python3.7/subprocess.py", line 342, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python3.7/subprocess.py", line 323, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'conda': 'conda'
INFO: Call stack for the definition of repository 'com_intel_plaidml_conda_unix' which is a conda_repo (rule definition at /home/outeh/Schreibtisch/plaidml-master/bzl/conda_repo.bzl:32:14):
 - /home/outeh/Schreibtisch/plaidml-master/bzl/workspace.bzl:142:5
 - /home/outeh/Schreibtisch/plaidml-master/WORKSPACE:16:1
ERROR: An error occurred during the fetch of repository 'com_intel_plaidml_conda_unix':
   conda_repo failed:  (Traceback (most recent call last):
  File "/home/outeh/Schreibtisch/plaidml-master/bzl/conda_wrapper.py", line 225, in <module>
    main()
  File "/home/outeh/Schreibtisch/plaidml-master/bzl/conda_wrapper.py", line 218, in main
    subprocess.check_call(['conda'] + sys.argv[1:])
  File "/usr/lib/python3.7/subprocess.py", line 342, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python3.7/subprocess.py", line 323, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'conda': 'conda'
)
INFO: Call stack for the definition of repository 'half' which is a http_archive (rule definition at /home/outeh/.cache/bazel/_bazel_outeh/5496f4076f1e3349abea4f0d166c72da/external/bazel_tools/tools/build_defs/repo/http.bzl:262:16):
 - /home/outeh/Schreibtisch/plaidml-master/bzl/workspace.bzl:41:5
 - /home/outeh/Schreibtisch/plaidml-master/WORKSPACE:16:1
ERROR: /home/outeh/Schreibtisch/plaidml-master/plaidml/keras/BUILD:128:1: //plaidml/keras:wheel depends on @com_intel_plaidml_conda_unix//:python in repository @com_intel_plaidml_conda_unix which failed to fetch. no such package '@com_intel_plaidml_conda_unix//': conda_repo failed:  (Traceback (most recent call last):
  File "/home/outeh/Schreibtisch/plaidml-master/bzl/conda_wrapper.py", line 225, in <module>
    main()
  File "/home/outeh/Schreibtisch/plaidml-master/bzl/conda_wrapper.py", line 218, in main
    subprocess.check_call(['conda'] + sys.argv[1:])
  File "/usr/lib/python3.7/subprocess.py", line 342, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python3.7/subprocess.py", line 323, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'conda': 'conda'
)
ERROR: Analysis of target '//plaidml/keras:wheel' failed; build aborted: no such package '@com_intel_plaidml_conda_unix//': conda_repo failed:  (Traceback (most recent call last):
  File "/home/outeh/Schreibtisch/plaidml-master/bzl/conda_wrapper.py", line 225, in <module>
    main()
  File "/home/outeh/Schreibtisch/plaidml-master/bzl/conda_wrapper.py", line 218, in main
    subprocess.check_call(['conda'] + sys.argv[1:])
  File "/usr/lib/python3.7/subprocess.py", line 342, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python3.7/subprocess.py", line 323, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'conda': 'conda'
)
INFO: Elapsed time: 0.964s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets conf\
igured)

(это также происходит, если попытаться собрать для любой другой платформы без conda)

Редактировать: Этот вопрос имеетна мой вопрос на github уже был (хотя бы частично) ответ (https://github.com/plaidml/plaidml/issues/535). Но не стесняйтесь отвечать, если вы считаете, что можете предоставить дополнительную информацию.

...