conda create -n spformer python=3.8
conda activate spformer
git clone https://github.com/sunjiahao1999/SPFormer.git
pip install spconv-cu114
conda install pytorch-scatter -c pyg
#is_available()=False
pip install torch==1.10.0+cu111 torchvision==0.11.0+cu111 torchaudio==0.10.0 -f https://download.pytorch.org/whl/torch_stable.html
#ok
pip install -r requirements.txt
sudo apt-get install libsparsehash-dev
python setup.py develop
cd spformer/lib/
python setup.py develop

ln -s /home/data1/smn/PointCloud/scannet/scans /home/data1/smn/SPFormer/data/scannetv2
ln -s /home/data1/smn/PointCloud/scannet/scans_test /home/data1/smn/SPFormer/data/scannetv2
cd data/scannetv2
bash prepare_data.sh

cd csrc && mkdir build && cd build

cmake .. \
-DCMAKE_PREFIX_PATH=`python -c 'import torch;print(torch.utils.cmake_prefix_path)'` \
-DPYTHON_INCLUDE_DIR=$(python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")  \
-DPYTHON_LIBRARY=$(python -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))") \
-DCMAKE_INSTALL_PREFIX=`python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())'` 

make && make install

sudo apt install build-essential libssl-dev
wget https://cmake.org/files/v3.18/cmake-3.18.0.tar.gz
tar -zxvf cmake-3.18.0.tar.gz
cd cmake-3.18.0
mkdir build
cd build
cmake ..
make
sudo make install
cmake --version
