aim-uofa/Matcher

Full installation instructions using conda, updated

Opened this issue · 0 comments

I opened an issue on the project repository to troubleshoot some setup challenges encountered during this installation. I will use conda 12.1 and torch 2.5 (for this reasons I was not able to install detectron2, at first attempt), because xformer doesn't support older versions of torch. Useful links:


# Creating and activating the matcher2 environment
conda create --name matcher2 python=3.9 -y
conda activate matcher2

# Installing PyTorch 2.5.0 with CUDA 12.1
conda install pytorch==2.5.0 torchvision==0.20.0 torchaudio==2.5.0 pytorch-cuda=12.1 -c pytorch -c nvidia

# Installing GCC and Ninja from conda-forge
conda install -c conda-forge gcc_linux-64=7 gxx_linux-64=7
conda install -c conda-forge ninja

# Installing detectron2 for PyTorch 2.5.1 and CUDA 12.1
pip install --extra-index-url https://miropsota.github.io/torch_packages_builder detectron2==0.6+2a420edpt2.5.1cu121

# Installing xformers for CUDA 12.1
pip install -U xformers --index-url https://download.pytorch.org/whl/cu121

# Installing panopticapi and Semantic-SAM
pip install git+https://github.com/cocodataset/panopticapi.git
git clone https://github.com/UX-Decoder/Semantic-SAM
cd Semantic-SAM
python -m pip install -r requirements.txt
cd ..

# install Matcher and dependencies
git clone https://github.com/aim-uofa/Matcher.git
cd Matcher
pip install -r requirements.txt

# Setting environment variables for shared libraries
export LD_LIBRARY_PATH=/home/../anaconda3/envs/matcher2/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/../anaconda3/envs/matcher2/lib/python3.9/site-packages/tensorrt/

Disclaimer: this code is just a starting point, suggestions are welcome.