-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_conda_env_afford.sh
executable file
·89 lines (70 loc) · 2.2 KB
/
create_conda_env_afford.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/bin/bash
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# should match env name from YAML
ENV_NAME=afford
pushd "${ROOT_DIR}"
# setup conda
CONDA_DIR="$(conda info --base)"
source "${CONDA_DIR}/etc/profile.d/conda.sh"
# deactivate the env, if it is active
ACTIVE_ENV_NAME="$(basename ${CONDA_PREFIX})"
if [ "${ENV_NAME}" = "${ACTIVE_ENV_NAME}" ]; then
conda deactivate
fi
# !!! this removes existing version of the env
conda remove -y -n "${ENV_NAME}" --all
# create the env from YAML
conda env create -f ./rlgpu_conda_env.yml
if [ $? -ne 0 ]; then
echo "*** Failed to create env"
exit 1
fi
# activate env
conda activate "${ENV_NAME}"
if [ $? -ne 0 ]; then
echo "*** Failed to activate env"
exit 1
fi
# double check that the correct env is active
ACTIVE_ENV_NAME="$(basename ${CONDA_PREFIX})"
if [ "${ENV_NAME}" != "${ACTIVE_ENV_NAME}" ]; then
echo "*** Env is not active, aborting"
exit 1
fi
conda install -y pytorch=1.13.0 torchvision pytorch-cuda=11.6 cudatoolkit=10.1 -c pytorch -c nvidia
conda install -y -c fvcore -c iopath -c conda-forge fvcore iopath
conda install -y -c bottler nvidiacub
conda install -y pytorch3d -c pytorch3d
# for install requirements
pip install -r requirements.txt
# install isaacgym package
pip install -e .
popd
# install vgn package
pip install trimesh
pip install urdfpy
pip install catkin_pkg
pip install -e ./src
# installing torch-scatter based on torch 1.7.0 and cuda 10.1
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/nvidia/lib64
# pip -v install --no-index torch-scatter -f https://pytorch-geometric.com/whl/torch-1.7.0+cu101.html
conda install -y pytorch-scatter -c pyg
pip install -U scikit-learn
pip install seaborn
pip install umap-learn
pip install moviepy
pip install pptk
pip install opencv-python
pip install scikit-image
pip install timeout-decorator
# pip install pytorch3d
# pip install pytorch-ignite
pip install torchgeometry
# for new scripts
pip install einops
pip install transformers
pip install ftfy
pip install constants
# pip install graspnetAPI
pip install wandb
echo "SUCCESS"