naver/mast3r

demo_glomap environment setup

Opened this issue · 2 comments

I am trying to use demo_glomap.

To use it, we need to first install faiss in the following way:
···
conda install -c pytorch -c nvidia -c rapidsai -c conda-forge faiss-gpu-raft=1.8.0
···

But there are still environment issues here:
mast3r processor need to import asmk_method which is a very old project: https://github.com/jenicek/asmk

When I try to install it follow their description, I find that I do not have the following:

cython/hamming.c:209:12: fatal error: longintrepr.h: No such file or directory
  209 |   #include "longintrepr.h"
      |            ^~~~~~~~~~~~~~~

Hi,
did you check the updated install instructions ?

pip install cython

git clone https://github.com/jenicek/asmk
cd asmk/cython/
cythonize *.pyx
cd ..
pip install .  # or python3 setup.py build_ext --inplace
cd ..

I had the similar issue.
Turns out faiss version was wrong for me. I followed https://stackoverflow.com/questions/58957169/faiss-error-could-not-find-a-version-that-satisfies-the-requirement-faiss-from and thus running:

$ pip install faiss-cpu
# or: 
$ pip install faiss-gpu-cu12 # CUDA 12.x, Python 3.8+
$ pip install faiss-gpu-cu11 # CUDA 11.x, Python 3.8+
$ pip install faiss-gpu # Python 3.6-3.10 (legacy, no longer available after version 1.7.3)

before pip install . in the list of commands above solved the issue for me.