Dvc: ARM architecture support

Created on 4 Feb 2020  ·  20Comments  ·  Source: iterative/dvc

Recently I have tried to install DVC on Nvidia Jetson TX2 without any success (I have tried pip and deb packages). It seems that amd64 is the only supported architecture by now. Are there any plans for ARM-based devices support (Nvidia Jetson, Raspberry Pi, etc.)?

Requirements:

  1. Hardware: Jetson TX2.
  2. OS: Ubuntu 18.04.3.
  3. Python version: 3.6.9 (inside virtual environment).

Steps to reproduce:

pip install dvc[all]

Result:

Installation fails with error message:

  CMake Error at cmake_modules/FindNumPy.cmake:62 (message):
    NumPy import failure:

    Traceback (most recent call last):

      File "<string>", line 1, in <module>

    ModuleNotFoundError: No module named 'numpy'

  Call Stack (most recent call first):
    CMakeLists.txt:189 (find_package)


  -- Configuring incomplete, errors occurred!
  See also "/tmp/pip-install-xrq0e8dy/pyarrow/build/temp.linux-aarch64-3.6/CMakeFiles/CMakeOutput.log".
  See also "/tmp/pip-install-xrq0e8dy/pyarrow/build/temp.linux-aarch64-3.6/CMakeFiles/CMakeError.log".
  error: command 'cmake' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pyarrow
Failed to build pyarrow
ERROR: Could not build wheels for pyarrow which use PEP 517 and cannot be installed directly

P.S.:
You can find full log for pip install dvc[all] here: https://gist.github.com/nik123/f12c7e26c1005d12bbccff3e97ae586c

feature request p2-medium research

Most helpful comment

If anybody needs it, I installed it on arm64 with gdrive support (but if you don't need it you can just pip install dvc in the last command) on Nvidia PX2 (Ubuntu 16.04) like below (add sudo to each command if you need it).

apt install -y software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa       && \
apt update && \
apt install -y libffi-dev && \
apt install -y python3.6-dev && \
apt install -y python3-pip && \
python3.6 -m pip install --upgrade pip && \
python3.6 -m pip install --upgrade setuptools && \
python3.6 -m pip install dvc[gdrive]

All 20 comments

@nik123 , have you encountered any specific error?

@nik123 To be honest, we haven't ever looked into ARM support :slightly_smiling_face: Indeed, deb package is a binary package, which is only meant for x86_64. Have you tried installing from conda or pip?

@efiop , from his comment:

I have tried pip and deb packages

@mroutis Oops, sorry, long day :slightly_smiling_face: Yeah, would love to see the pip error then. I imagine the issue there might be that some of our dependencies don't have binary wheels for arm and so pip tries to compile and fails.

@efiop I have tried to install via pip too. Right now I don't have access to the arm device. But as soon as I will have access to it I will try to install dvc again and post result here.

@mroutis , @efiop : I have updated description with error message and also attached full log for pip install dvc[all]

P.S.:
It seems if I install dvc itself (pip install dvc) it works fine. However if I try pip install dvc[all] it fails with error.

@nik123 Ok, looks like pyarrow is the cause there. Do you need support for hdfs? If not, just use whichever options you need instead of all, except for hdfs. E.g. pip install '[gs,s3,azure,oss,ssh,gdrive]' to install everything except for hdfs support. Please try it out and let us know how if it works or not. :slightly_smiling_face: Honestly looks promising so far :slightly_smiling_face:

@efiop pip install 'dvc[gs,s3,azure,oss,ssh,gdrive]' ended with success.

@nik123 That is great! :slightly_smiling_face: Does dvc also work as expected after installation?

Btw, could you show the error you were getting when installing deb package? It seems to have the platform info in it, so i expect it to handle incorrect destination platform gracefully.

I suppose pip package suits you in that form? Or do you need deb package?

In terms of action points here, so far we may be able to put some env marker check (e.g. https://github.com/vlachoudis/bCNC/blob/master/setup.py#L26 or maybe just if in setup.py would work, unsure) to not include pyarrow into all target on ARM. Though, I can't really guarantee that some another dependency won't break, as we admittedly don't support ARM "officially".

This is the first time someone reached out about using dvc on ARM, so I am wondering how many ARM users we have and if it would be reasonable to add an arm machine on travis to check that...

Setting aside the question whether we need to support ARM, it's a pyarrow issue, i.e. pip install pyarrow will fail as well. It makes sense opening issue there too.

@Suor yep! (but I would surprised if they are not aware about this already. I saw a post from Wes complaining about lack of wheels and how it's hard to support them, etc ...)

Looks likely necessary to pip install numpy first based on the logs so that pyarrow's numpy-based cmake install works. AFAIK this would be an issue with all platforms, not just ARM :/

Fyi pip install dvc works fine on my arm64 phone

@nik123 That is great! slightly_smiling_face Does dvc also work as expected after installation?

@efiop It works as intended. Although I mostly use dvc pull to get data.

Btw, could you show the error you were getting when installing deb package? It seems to have the platform info in it, so i expect it to handle incorrect destination platform gracefully.

Package manager says that deb package doesn't support arm64. Here is the error message (sorry it's not english. Unfortunately it's the way my device is configured):

$ dpkg -i dvc_0.82.8_amd64.deb
dpkg: ошибка при обработке архива dvc_0.82.8_amd64.deb (--install):
 архитектура пакета (amd64) не соответствует архитектуре системы (armhf)
При обработке следующих пакетов произошли ошибки:
 dvc_0.82.8_amd64.deb

I suppose pip package suits you in that form? Or do you need deb package?

Yes, pip package covers my needs. Thanks!

@nik123 can you try pip install numpy and then pip install dvc[all] again?

@nik123 can you try pip install numpy and then pip install dvc[all] again?

I tried. It fails with the same error. Full log: https://gist.github.com/nik123/7af9ca1103a097e976f7caa57c6d079a

@casperdcl pyarrow compilation is quite hard in all aspects, we've ran into it previously.

@nik123 So deb is indeed showing a meaningful error, so no action is required from our package side. Though we could explicitly document that we don't provide binary packages for ARM, but that might be excessive considering that we are getting rid of binary packages in our docs in favour of package managers like pip, conda, brew, choco, etc. That being said, we should probably document that dvc can be installed on ARM through pip and maybe other package managers.

Also, looks like we should setup travis ARM worker after all.

So leaving this ticket opened for the sake of ^ action points.

@nik123 Thanks for the feedback! :slightly_smiling_face:

ah I see

  • might have to pip uninstall numpy/pip3 uninstall numpy multiple times in case there are conflicting versions installed on top of each other
  • pip3 install numpy might work
  • might need to mess with findNumpy/cmake vars (https://github.com/ray-project/ray/pull/820)
  • related to https://github.com/apache/arrow/issues/5987

should be an upstream issue.

If anybody needs it, I installed it on arm64 with gdrive support (but if you don't need it you can just pip install dvc in the last command) on Nvidia PX2 (Ubuntu 16.04) like below (add sudo to each command if you need it).

apt install -y software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa       && \
apt update && \
apt install -y libffi-dev && \
apt install -y python3.6-dev && \
apt install -y python3-pip && \
python3.6 -m pip install --upgrade pip && \
python3.6 -m pip install --upgrade setuptools && \
python3.6 -m pip install dvc[gdrive]

Closing as stale. Unfortunately we don't have resources to setup and maintain ARM ci right now :( We could reconsider If there is more interest from the community, so please leave a comment if you are interested.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shcheklein picture shcheklein  ·  3Comments

siddygups picture siddygups  ·  3Comments

ghost picture ghost  ·  3Comments

mdscruggs picture mdscruggs  ·  3Comments

gregfriedland picture gregfriedland  ·  3Comments