Isaac Gym安装及环境搭建

一、硬件配置

显卡:NVIDIA GeForce RTX 4090 64GB

显卡驱动NVIDIA driver version:550

系统:ubuntu 22.04

已安装:conda

二、Isaacgym官方要求

官网链接:Isaac Gym - Preview Release | NVIDIA Developer

下载代码:

tar xf IsaacGym_Preview_4_Package.tar.gz  #解压下载的包
# cd isaacgym
# ./create_conda_env_rlgpu.sh 

备注:不要直接执行./create_conda_env_rlgpu.sh,生成的名为rlgpu的conda环境中的python、pytorch及相关配置不满足4090显卡及驱动的要求

1.在~/Documents路径下新建project

/Documents/IsaacGym_Program

2.将解压的功能包中/isaacgym复制到Isaacgym_Program

/Documents/IsaacGym_Program

3.新建conda环境rlgpu

(base) ➜  IsaacGym_Program conda create -n rlgpu python=3.8

成功后显示:

4.进入rlgpu环境,配置pytorch及相关包

conda activate rlgpu
conda install pytorch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 pytorch-cuda=11.8 -c pytorch -c nvidia

备注:

  1. 时间比较长耐心等待,成功后如下图:
  2. 如何确定自己的显卡驱动版本、pytorch要求见附录

5.使用pip安装依赖

# 位置: isaacgym/python  ,别把 . 丢了
pip install -e .

备注:

执行完会报一个warning

DEPRECATION: Legacy editable install of isaacgym==1.0rc4 from file:///home/eai/Documents/IsaacGym_Program/isaacgym/python (setup.py develop) is deprecated. pip 25.0 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information. Discussion can be found at https://github.com/pypa/pip/issues/11457

强迫症可以执行

pip install -e . --use-pep517

6.cd 到python/examples 目录下,验证安装是否成功

python 1080_balls_of_solitude.py

成功效果:

备注:只是动画效果,并不表示强化学习环境ok

        由于Isaacgym官方从某个版本开始将IsaacGymEnvs给单独出去了,所以要单独安装,下一篇安装IsaacGymEnvs。

     三、附录

    1.确定自己的显卡驱动版本

    2.确定cuda最高版本(图片右上角是最高版本)

     nvidia-smi

    3.根据显卡算力确定pytorch及相关配置版本

    链接:NVIDIA驱动、CUDA、Cudnn、Pytorch、MMCV和显卡算力对应关系以及安装_cuda对应的mmcv-CSDN博客

     一篇文章理清GPU、CUDA、CUDA Toolkit、cuDNN的关系_cudnn和cuda的关系-CSDN博客

     4.显卡驱动安装

    ubuntu 22.04 安装 RTX 4090 显卡驱动 GPU Driver(PyTorch准备)_ubuntu安装4090显卡驱动-CSDN博客

    5.常见报错

    RuntimeError: nvrtc: error: invalid value for --gpu-architecture (-arch)

     升级pytorch解决

      评论
      添加红包

      请填写红包祝福语或标题

      红包个数最小为10个

      红包金额最低5元

      当前余额3.43前往充值 >
      需支付:10.00
      成就一亿技术人!
      领取后你会自动成为博主和红包主的粉丝 规则
      hope_wisdom
      发出的红包
      实付
      使用余额支付
      点击重新获取
      扫码支付
      钱包余额 0

      抵扣说明:

      1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
      2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

      余额充值