赶论文跑 baseline 极速配环境指南
-
看到 Target Code Readme 里面的 Python 版本,pytorch 版本。完全按照 Readme 的python,pytorch版本安装。(如果可以的话)
-
cuda 版本。cuda版本 12 跟 cuda 版本11相差会很大。确定自己机器的显卡GPU是否支持 Target Code 需要的 cuda 版本。
- 假设机器 NVIDIA 的 cuda 是 12.*, ( 在A100 或者 4090显卡中常见),但是在 conda/pip 环境中使用的 Pytorch 或者 cupy 需要 cuda 是 11.*版本,那么可以用下面的命令在 conda/pip 环境中配一个 cudatookit:
conda install cudatoolkit=11.2.1
- 假设机器 NVIDIA 的 cuda 是 12.*, ( 在A100 或者 4090显卡中常见),但是在 conda/pip 环境中使用的 Pytorch 或者 cupy 需要 cuda 是 11.*版本,那么可以用下面的命令在 conda/pip 环境中配一个 cudatookit:
-
Python requirements.txt,先阅读一遍,因为有可能有些 3rd library 需要指定 wheel 或者 setuptools 特定版本。尽量按照 Requirements.txt 的安装。
-
浏览一遍 Readme其他内容,不能掉以轻心。
-
直接使用本地终端而不是 Vscode 终端 pip install 速度会快一些。(经验)
服务器使用本地的 scientific上网
export http_proxy=http://你的ip地址:7890
export https_proxy=$http_proxy
unset http_proxy
unset https_proxy
复制已有的一个 conda 虚拟环境
conda pack --ignore-editable-packages -n gaprl
指定 Python 版本 创建某个环境
conda create -n your_env_name python=x.x
删除某个环境
conda remove -n your_env_name --all
pip 使用镜像下载
pip install -i https://mirrors.zju.edu.cn/pypi/web/simple some-package
pip install --upgrade pip
pip install --upgrade wheel
pip install --upgrade setuptools
(gaprl) conda pack --ignore-editable-packages -n gaprl
Collecting packages...
CondaPackError:
Files managed by conda were found to have been deleted/overwritten in the
following packages:
- setuptools 75.8.0:
lib/python3.9/site-packages/setuptools-75.8.0-py3.9.egg-info/PKG-INFO
lib/python3.9/site-packages/setuptools-75.8.0-py3.9.egg-info/SOURCES.txt
lib/python3.9/site-packages/setuptools-75.8.0-py3.9.egg-info/dependency_links.txt
+ 20 others
- pip 25.0:
lib/python3.9/site-packages/pip-25.0.dist-info/AUTHORS.txt
lib/python3.9/site-packages/pip-25.0.dist-info/INSTALLER
lib/python3.9/site-packages/pip-25.0.dist-info/LICENSE.txt
+ 7 others
This is usually due to `pip` uninstalling or clobbering conda managed files,
resulting in an inconsistent environment. Please check your environment for
conda/pip conflicts using `conda list`, and fix the environment by ensuring
only one version of each package is installed (conda preferred).
# torch 的手动下载
https://download.pytorch.org/whl/torch_stable.html
pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 -f https://download.pytorch.org/whl/torch_stable.html
pip install --upgrade "pip<24.1"
### gym 0.21.0 need pip install setuptools==65.5.0 "wheel<0.40.0"
pip install gym==0.21.0
pip install stable_baselines3==1.8.0
pip install sapien==2.2.2
pip install gdown>=4.6.0
pip install scipy mplib h5py pyyaml tqdm tabulate
pip install scikit-image open3d transforms3d opencv-python imageio imageio[ffmpeg] trimesh rtree
pip install tensorboard numba cupoch tensorboardX torchsummary fvcore
https://anaconda.org/pytorch3d/pytorch3d/0.7.3/download/linux-64/pytorch3d-0.7.3-py39_cu117_pyt1131.tar.bz2
conda install pytorch3d-0.7.3-py39_cu117_pyt1131.tar.bz2
cd /mnt/data1/pointMLP-pytorch/pointnet2_ops_lib
pip install -e .
pip install graspnetAPI
pip install numpy==1.23
pip install -U 'sapien>=3.0.0b1'
python -m pip install --upgrade pip