其他分享
首页 > 其他分享> > A6000显卡配置Scene-Graph-Benchmark.pytorch(KaihuaTang)过程

A6000显卡配置Scene-Graph-Benchmark.pytorch(KaihuaTang)过程

作者:互联网

服务器上配置Scene-Graph-Benchmark.pytorch-KaihuaTang工程记录

GitHub地址https://github.com/KaihuaTang/Scene-Graph-Benchmark.pytorch

服务器cuda版本

命令行输入nvcc -V即可查看,我这里是11.1

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Mon_Oct_12_20:09:46_PDT_2020
Cuda compilation tools, release 11.1, V11.1.105
Build cuda_11.1.TC455_06.29190527_0

创建虚拟环境

每run一个工程,都要创建一个对应的虚拟环境,方便管理

conda create --name scene_graph_benchmark python=3.7
conda activate scene_graph_benchmark

在虚拟环境下安装pkgs

conda install ipython
conda install scipy
conda install h5py
pip install ninja yacs cython matplotlib tqdm opencv-python overrides
如果opencv-python安装不上,或者很慢,可以去下载whl文件

安装maskrcnn_benchmark

这里可以按照项目中的INSTALL.md安装,不过有需要注意的地方

cd unbiased_sgg_xuhongbo
git clone git://github.com/cocodataset/cocoapi.git
cd cocoapi/PythonAPI
python setup.py build_ext install
cd unbiased_sgg_xuhongbo
git clone git://github.com/NVIDIA/apex.git
cd apex
python setup.py install
cd unbiased_sgg_xuhongbo
git clone https://github.com/KaihuaTang/Scene-Graph-Benchmark.pytorch.git
python setup.py build develop

至此,环境就配置完毕了,下面说说可能遇到的问题。

配置可能会踩得坑

  1. 工程中readme里的torch版本是1.4.0,但是估计是跑不起来,最好是高版本的torch
  2. 安装torch和torchvision时,最好不用命令行安装,容易装成cpu版本的torch。去下载whl文件,然后用pip install *.whl安装
  3. ninja如果说需要C++扩展,就卸载掉,然后重装,大概率会好
  4. glove一定要提前下载好,命令行执行时需要
  5. 数据集的路径要修改好,在Scene-Graph-Benchmark.pytorch-master\maskrcnn_benchmark\config\paths_catalog.py文件里
  6. 总之,按照步骤配置大概率不会出错,如果出错大概率是torch和torchvision的问题。

标签:A6000,git,python,Graph,Benchmark,虚拟环境,install,benchmark,安装
来源: https://blog.csdn.net/weixin_45452278/article/details/122862978