AlphaPose
AlphaPose copied to clipboard
doc/install.md文档有些需要更新的部分
2023/7/19测试时发现按照install.md的提示无法正确地安装,测试环境为Ubuntu22.04 + Conda python3.7
使用以下的方式可以正确地安装,已提交pr:
conda create -n alphapose python=3.7 -y
conda activate alphapose
conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch
git clone https://github.com/MVIG-SJTU/AlphaPose.git
cd AlphaPose
export PATH=/usr/local/cuda/bin/:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64/:$LD_LIBRARY_PATH
pip install cython==0.27.3
pip install ninja
pip install easydict halpecocotools munkres natsort opencv-python pyyaml scipy tensorboardx terminaltables timm==0.1.20 tqdm visdom jinja2 typeguard
sudo apt-get install libyaml-dev
pip install pycocotools
python setup.py build develop
conda install -c fvcore -c iopath -c conda-forge fvcore iopath
conda install -c bottler nvidiacub
pip install pytorch3d
Thanks! You are right. These operations are also used in the following environments:
- OS: Ubuntu 20.04.4 LTS (x86_64)
- CUDA used to build PyTorch: 11.3
- PyTorch version: 1.11.0+cu113
- Python version: 3.8.10
- CUDA runtime version: 11.3.109
I hope the author will update the documentation soon. Also, wouldn't it be cleaner to generate a requirements.txt
file to store these python dependencies?
This seems to fail on the current version of colab. I think the CUDA version is outdated
Thnaks for sharing! I have a fresh installation of ubuntu 22.04 on 2023/9 and encounter other error messages. Below is my solutions:
error1: OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root. Since I dont install cuda on ubuntu, I only install cuda within conda. It needs to install cudatoolkit on the nvidia channel.
my solution: conda install -c "nvidialabel/cuda-11.3.1" cuda-toolkit ref: https://anaconda.org/nvidia/cuda-toolkit
ps. In this way, I do not use export cammand.
error2: RuntimeError: The current installed version of g++ (11.4.0) is greater than the maximum required version by CUDA 11.3 (10.0.0). Please make sure to use an adequate version of g++ (>=5.0.0, <=10.0.0).
The default gcc version is 11, so I install gcc-9 to solve this peoblem.
my solution: sudo apt install gcc-9 g++-9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11
// use the following command to specific the gcc version sudo update-alternatives --config g++ sudo update-alternatives --config gcc
pip install cython==0.27.3
pip install cython==0.27.3
solved many issues for me thank you.
Can someone fix the install.md ? It is clearly impossible to replicate
sudo apt-get update && sudo apt-get upgrade -y
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
export PATH=$PATH:~/miniconda3/bin
conda init
conda create -n alphapose python=3.7 -y
conda activate alphapose
sudo apt install gcc-9 g++-9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9
wget https://developer.download.nvidia.com/compute/cuda/11.3.0/local_installers/cuda_11.3.0_465.19.01_linux.run
sudo sh cuda_11.3.0_465.19.01_linux.run
export PATH=/usr/local/cuda-11.3/bin/:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-11.3/lib64/:$LD_LIBRARY_PATH
wget https://developer.download.nvidia.com/compute/cudnn/9.1.0/local_installers/cudnn-local-repo-ubuntu2204-9.1.0_1.0-1_amd64.deb
sudo dpkg -i cudnn-local-repo-ubuntu2204-9.1.0_1.0-1_amd64.deb
sudo cp /var/cudnn-local-repo-ubuntu2204-9.1.0/cudnn-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cudnn-cuda-11
pip install torch==1.12.0+cu113 torchvision==0.13.0+cu113 torchaudio==0.12.0 --extra-index-url https://download.pytorch.org/whl/cu113
https://github.com/HaoyiZhu/HalpeCOCOAPI/issues/1
git clone https://github.com/HaoyiZhu/HalpeCOCOAPI.git
cd HalpeCOCOAPI/PythonAPI
python3 setup.py build develop
git clone https://github.com/MVIG-SJTU/AlphaPose.git
cd AlphaPose
pip install ninja
pip install cython matplotlib cython_bbox numpy scipy easydict opencv-python pycocotools pyyaml tensorboardx terminaltables tqdm visdom
CC=gcc-9 CXX=g++-9 python setup.py build develop
conda install -c fvcore -c iopath -c conda-forge fvcore iopath
conda install -c bottler nvidiacub
pip install pytorch3d
sudo apt-get install libgl1
export LD_LIBRARY_PATH=/usr/lib/wsl/lib:$LD_LIBRARY_PATH
##RESTART YOUR TERMINAL
My AlphaPose journey