medaka icon indicating copy to clipboard operation
medaka copied to clipboard

Installation on ARMv8 Processor Ubuntu 18

Open SemiQuant opened this issue 3 years ago • 2 comments

Describe the bug I'm trying to install medaka on ARMv8 Processor Ubuntu 18, but have been uncessesful. I've tried several ways and changed alot, so my errors keep changing. Here attached is an example using pip.

Logging Please attach any relevant logging messages. (Use ``` before and after code blocks).

**Environment (GPU):

  • Installation method [all these github source, pypi (pip install), conda]
  • OS: Ubuntu 18.04
  • medaka version (ideally 1.1.3, but tried many)
  • GPU model: jetson nano
  • CUDA version 10.1 medaka_error_pip.txt

SemiQuant avatar Feb 02 '22 03:02 SemiQuant

Use of medaka on ARM is only experimentally supported. We have been able to make it work in the past with some modifications to the build process.

From my notes on doing this on a TX2 development board with JetPack 4.4, in October 2020:

virtualenv --python=python3 venv
. venv/bin/activate
# for tensorflow wheel
sudo apt-get install libhdf5-serial-dev hdf5-tools libhdf5-dev zlib1g-dev zip libjpeg8-dev liblapack-dev libblas-dev gfortran
pip install numpy==1.16.1 future==0.18.2 mock==3.0.5 h5py==2.10.0 keras_preprocessing==1.1.1 keras_applications==1.0.8 gast==0.2.2 futures protobuf pybind11
pip install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v44 tensorflow==2.2.0
 
# for pysam
sudo apt install libbz2-dev liblzma-dev
# install medaka
pip install medaka==1.1.0a3
# at this point running will lead to import errors for spoa and parasail
# just comment these out and replace references to parasail.dnafull with None
# there will also be errors relating to ont_fast5_api, just comment that out too
medaka consensus calls_to_draft.bam medaka.hdf --batch 32

The important point in the above is to grab the tensorflow build from NVIDIA's repository matching the jetpack version used. They have a mixed bag of prebuilt versions -- so you may need to amend the version of tensorflow in requirements.txt and the jetpack version used. I think medaka will be happy with any version of tensorflow >=2.2.0 (we have 2.5 set in the requirements because we build a python3.9 wheel and pypi only contains a 3.9 wheel for tensorflow after 2.5).

cjw85 avatar Feb 02 '22 12:02 cjw85

@SemiQuant Have you had any luck here, I tried yesterday and got stuck when Python's build system was failing to compile h5py 2.10 from source. It wasn't giving any helpful messages. I had similar on Apple M1 recently, moving to Tensorflow 2.7 sidestepped that since it requires h5py 3.1.0 which appears to build fine under pip's wheel build workflow.

What I have done is made some changes to medaka itself so that the import hacks noted above shouldn't be necessary. (At some point we will get aarch64 builds of spoa parasail into PyPI).

cjw85 avatar Feb 08 '22 09:02 cjw85

I'm going to close this. We've had more luck recently building ARM wheels.

cjw85 avatar Aug 28 '23 12:08 cjw85