results show
transfer pose show
ubuntu 16.04
cuda 9.0
cudnn 7
pytorch 1.0
Caffe2
conda create -n name --clone name
https://caffe2.ai/docs/getting-started.html?platform=ubuntu&configuration=compile#install-with-gpu-support
Archiving libnccl_static.a > /home/frist/pytorch/build/nccl/lib/libnccl_static.a
/home/frist/pytorch/third_party/nccl/nccl/src
[ 66%] No install step for 'nccl_external'
[ 66%] Completed 'nccl_external'
[ 66%] Built target nccl_external
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
File "setup.py", line 719, in
build_deps()
File "setup.py", line 285, in build_deps
build_dir='build')
File "/home/frist/pytorch/tools/build_pytorch_libs.py", line 281, in build_caffe2
check_call(['make', '-j', str(max_jobs), 'install'], cwd=build_dir, env=my_env)
File "/home/frist/anaconda2/envs/desepose1/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make', '-j', '12', 'install']' returned non-zero exit status 2
(desepose1) frist@frist-Alienware-Aurora-R7:~/pytorch$ ^C
(desepose1) frist@frist-Alienware-Aurora-R7:~/pytorch$
sudo apt-get install liblapack-dev
第一步:确定你机器是否有
libmklml_intel.so
, 用以下命令:
find / -name libmklml_intel.so
第二步:如果没有 libmklml_intel.so, 请安装mklml;
第三步:假设 libmklml_intel.so在路径“/home/work/mklml/lib
”下,设置环境变量:
export LD_LIBRARY_PATH=/home/work/mklml/lib:$LD_LIBRARY_PATH
最后,执行之前的命令,验证是否还有原来的错误。
/home/frist/pytorch/third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.3.20190220/lib/libmklml_intel.so
1.
使用如下命令
debug
一下
conda install --debug mkl
2.
在
anaconda
里 搜索”
mkl”,
把相关的文件都删除
3.
使用如下命令重新装一下
mkl
包
conda install mkl
sudo apt-get install libblas-dev checkinstall
sudo apt-get install libblas-doc checkinstall
sudo apt-get install liblapack-dev checkinstall
sudo apt-get install liblapack-doc checkinstall
conda install pytorch torchvision cudatoolkit=9.0 -c pytorch
cd ~ && python -c 'from caffe2.python import core' 2>/dev/null && echo "Success" || echo "Failure"
python2 -c 'from caffe2.python import workspace; print(workspace.NumCudaDevices())'
Install the COCO API:
# COCOAPI=/path/to/clone/cocoapi
git clone https://github.com/cocodataset/cocoapi.git $COCOAPI
cd $COCOAPI/PythonAPI
# Install into global site-packages
make install
# Alternatively, if you do not have permissions or prefer
# not to install the COCO API into global site-packages
python2 setup.py install --user
Note that instructions like # COCOAPI=/path/to/install/cocoapi
indicate that you should pick a path where you'd like to have the software cloned and then set an environment variable (COCOAPI
in this case) accordingly.
cd ~/cocoapi/PythonAPI
import pycocotools.coco
Traceback (most recent call last):
File "
File "pycocotools/coco.py", line 55, in
from . import mask as maskUtils
File "pycocotools/mask.py", line 3, in
import pycocotools._mask as _mask
(desepose1) frist@frist-Alienware-Aurora-R7:~/cocoapi/PythonAPI$ sudo apt-get install python-tk
(desepose1) frist@frist-Alienware-Aurora-R7:~/densepose$ pip install -r requirements.txt
(desepose1) frist@frist-Alienware-Aurora-R7:~/densepose/detectron/tests$ python2 test_spatial_narrow_as_op.py
found Detectron ops lib: /home/frist/anaconda2/envs/desepose1/lib/python2.7/site-packages/torch/lib/libcaffe2_detectron_ops_gpu.so
download detectron and make
copy detectron and info.egg to densepose
ok
/home/frist/anaconda2/pkgs/pytorch-1.0.1-py2.7_cuda9.0.176_cudnn7.4.2_2/lib/python2.7/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake
/home/frist/anaconda2/pkgs/pytorch-nightly-1.0.0.dev20190405-py3.7_cuda10.0.130_cudnn7.4.2_0/lib/python3.7/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake
/home/frist/anaconda2/envs/densepose/lib/python3.7/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake
/home/frist/anaconda2/envs/desepose1/lib/python2.7/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake
/home/frist/.local/share/Trash/files/pytorch/build/Caffe2Config.cmake
(desepose1) frist@frist-Alienware-Aurora-R7:~/densepose$ export Caffe2_DIR=$Caffe2_DIR:/home/frist/anaconda2/pkgs/pytorch-1.0.1-py2.7_cuda9.0.176_cudnn7.4.2_2/lib/python2.7/site-packages/torch/share/cmake/Caffe2
export include=$include:/home/frist/anaconda2/pkgs/pytorch-1.0.1-py2.7_cuda9.0.176_cudnn7.4.2_2/lib/python2.7/site-packages/torch/lib/include
export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/home/frist/anaconda2/pkgs/pytorch-1.0.1-py2.7_cuda9.0.176_cudnn7.4.2_2/lib/python2.7/site-packages/torch/lib/include
export PATH=$PATH:/home/frist/anaconda2/pkgs/pytorch-1.0.1-py2.7_cuda9.0.176_cudnn7.4.2_2/lib/python2.7/site-packages/torch/lib/include/caffe2/core
export PATH=$PATH:/home/frist/anaconda2/pkgs/pytorch-1.0.1-py2.7_cuda9.0.176_cudnn7.4.2_2/lib/python2.7/site-packages/torch/lib/include
/home/frist/anaconda2/pkgs/pytorch-1.0.1-py2.7_cuda9.0.176_cudnn7.4.2_2/lib/python2.7/site-packages/torch/lib/include/caffe2/core/allocator.h
/usr/include/google/protobuf/io/coded_stream.h
/home/frist/anaconda2/pkgs/libprotobuf-
3.6.1-
hd408876_0/include/google/protobuf/io/coded_stream.h
/home/frist/anaconda2/pkgs/libprotobuf-
3.5.2-
h6f1eeef_0/include/google/protobuf/io/coded_stream.h
/home/frist/anaconda2/pkgs/libprotobuf-
3.0.0-
0/include/google/protobuf/io/coded_stream.h
/home/frist/anaconda2/envs/desepose1/include/google/protobuf/io/coded_stream.h
export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:
/home/frist/anaconda2/pkgs/libprotobuf-3.5.2-h6f1eeef_0/include
must 3.5 version others not ok
(desepose1) frist@frist-Alienware-Aurora-R7:~/densepose$ protoc --version
libprotoc 2.6.1
(desepose1) frist@frist-Alienware-Aurora-R7:~/densepose$ which protoc
/usr/bin/protoc
如果安装
2.6.1
版本
#
移除所有相关
protobuf
的版本
sudo apt-get remove libprotobuf-dev protobuf-compiler
sudo apt-get remove libprotobuf-lite8 libprotoc8
sudo apt-get remove python-protobuf
sudo pip uninstall protobuf
# anaconda
conda uninstall protobuf
conda uninstall libprotobuf
#
重新安装
sudo apt-get install libprotobuf-dev protobuf-compiler
#if anaconda
,不要重复
conda install -c anaconda protobuf=2.6.1
must install version 3.5 it is ok and then set export env variables
/home/frist/anaconda2/pkgs/libprotobuf-3.6.1-hd408876_0/include/google/protobuf/stubs/common.h
export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:
/home/frist/anaconda2/pkgs/libprotobuf-3.6.1-hd408876_0/include
export PATH=$PATH:/home/frist//anaconda2/envs/desepose1/lib/python2.7/site-packages/torch/share/cmake/Caffe2
/home/frist/anaconda2/pkgs/libprotobuf-
3.6.1-
hd408876_0/include/google/protobuf/io/coded_stream.h
/home/frist/anaconda2/pkgs/libprotobuf-
3.5.2-
h6f1eeef_0/include/google/protobuf/io/coded_stream.h
/home/frist/anaconda2/pkgs/libprotobuf-
3.0.0-
0/include/google/protobuf/io/coded_stream.h
/home/frist/anaconda2/envs/desepose1/include/google/protobuf/io/coded_stream.h
export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:
/home/frist/anaconda2/pkgs/libprotobuf-3.5.2-h6f1eeef_0/include
https://blog.csdn.net/FatMigo/article/details/88246815
/home/frist/intel/compilers_and_libraries_2019.3.199/linux/mkl/include/mkl_cblas.h
export CPATH=/
/home/frist/intel/compilers_and_libraries_2019.3.199/linux/mkl/include:$CPATH
/home/frist/anaconda2/pkgs/pytorch-1.0.1-py2.7_cuda9.0.176_cudnn7.4.2_2/lib/python2.7/site-packages/torch/lib/include/caffe2/core/workspace.h:19:48: fatal error: caffe2/utils/threadpool/
ThreadPool.h: No such file or directory
copy pytorch caffe2 utils threadpool folder to the related directories
success
python2 infer_simple_
image
.py \
--cfg configs/DensePose_ResNet101_FPN_s1x-e2e.yaml \
--output-dir DensePoseData/infer_out/ \
--image-ext jpg \
--wts DensePoseData
/DensePose_ResNet101_FPN_s1x-e2e.pkl \
DensePoseData/demo_data/1.jpeg