jmcbroome / BTE

Cython API for the Mutation Annotated Tree (MAT) Online Phylogenetics Toolkit
https://jmcbroome.github.io/BTE/build/html/index.html
MIT License
10 stars 5 forks source link

Arm64 builds #12

Open theosanderson opened 1 year ago

theosanderson commented 1 year ago

Hi there,

I was thinking of giving BTE a go for some stuff, using my M1 Macbook, but I get

PackagesNotFoundError: The following packages are not available from current channels:

  - bte

Current channels:

  - https://conda.anaconda.org/bioconda/osx-arm64
  - https://conda.anaconda.org/bioconda/noarch

I suspect this is because there aren't arm64 builds available?

No pressure to change that, but just giving you visibility that some users may have this issue

theosanderson commented 1 year ago

For anyone following in my footsteps, when trying to set up the conda env to build from source I got:

ResolvePackageNotFound:
  - tbb-devel=2019.0

When I removed the pinning the conda environment could get created, but the subsequent build did not work due to a tbb issue

jmcbroome commented 1 year ago

Hi Theo- is conda-forge in your channels? I think that will address the second issue immediately, at least. I think the first one may just be that bioconda doesn't build bte for that specific architecture, which I may or may not be able to address if I arrange my conda recipe differently.

jmcbroome commented 1 year ago

Additionally, what's your Python version? If you're using a version of Python that isn't explicitly being built by bioconda it will show up as not available. Most Python3 versions should work with the local build, though.

theosanderson commented 1 year ago

Hi @jmcbroome, thanks for the advice. I do have conda-forge. It's specifically the =2019.0 that causes this not to be found -- maybe they didn't release arm64 builds for that version. I am using python 3.10.8.

(Don't worry too much on my account -- I do a lot on a Linux (WSL) machine anyway. Just wanted to flag in case it helps in general.)

jmcbroome commented 1 year ago

Yeah, maybe not. Python 3.10 is definitely supported directly. Not sure what would cause the dependency to not be found. If you want to get this working on your machine, you do have to have a TBB 2019 version. You can try installing TBB from source like what we do for UShER local builds, instead of relying on conda.

wget https://github.com/oneapi-src/oneTBB/archive/2019_U9.tar.gz
tar -xvzf 2019_U9.tar.gz
cmake  -DTBB_DIR=${PWD}/oneTBB-2019_U9  -DCMAKE_PREFIX_PATH=${PWD}/oneTBB-2019_U9/cmake ..

Sorry I can't be more immediate help with this issue.

theosanderson commented 1 year ago

Thanks, feel free to close/not as you like

jmcbroome commented 1 year ago

A small update on this issue: I've investigated some and it appears that conda does not provision tbb-2019 builds for arm64 architectures. I will be considering the development of an alternative installation approach, or simply matching UShER's handling by acquiring and building from source outside of conda's control. In the meantime, I've added a Docker installation method that should work on any platform (see the README).