File tree Expand file tree Collapse file tree 36 files changed +635
-169
lines changed
linux_distributed/scripts
linux_olddeps/scripts_gym_0_13 Expand file tree Collapse file tree 36 files changed +635
-169
lines changed Original file line number Diff line number Diff line change @@ -124,15 +124,15 @@ git submodule sync && git submodule update --init --recursive
124124printf " Installing PyTorch with %s\n" " ${CU_VERSION} "
125125if [[ " $TORCH_VERSION " == " nightly" ]]; then
126126 if [ " ${CU_VERSION:- } " == cpu ] ; then
127- pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
127+ pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu -U
128128 else
129- pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/$CU_VERSION
129+ pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/$CU_VERSION
130130 fi
131131elif [[ " $TORCH_VERSION " == " stable" ]]; then
132132 if [ " ${CU_VERSION:- } " == cpu ] ; then
133- pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
133+ pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cpu
134134 else
135- pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/$CU_VERSION
135+ pip3 install torch torchvision --index-url https://download.pytorch.org/whl/$CU_VERSION
136136 fi
137137else
138138 printf " Failed to install pytorch"
@@ -150,7 +150,11 @@ else
150150fi
151151
152152# install tensordict
153- pip3 install git+https://github.com/pytorch/tensordict.git
153+ if [[ " $RELEASE " == 0 ]]; then
154+ pip3 install git+https://github.com/pytorch/tensordict.git
155+ else
156+ pip3 install tensordict
157+ fi
154158
155159printf " * Installing torchrl\n"
156160python setup.py develop
Original file line number Diff line number Diff line change 2626# submodules
2727git submodule sync && git submodule update --init --recursive
2828
29- printf " Installing PyTorch with %s\n" " ${CU_VERSION} "
30- if [ " ${CU_VERSION:- } " == cpu ] ; then
31- pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
29+ if [[ " $TORCH_VERSION " == " nightly" ]]; then
30+ if [ " ${CU_VERSION:- } " == cpu ] ; then
31+ pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu -U
32+ else
33+ pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/$CU_VERSION -U
34+ fi
35+ elif [[ " $TORCH_VERSION " == " stable" ]]; then
36+ if [ " ${CU_VERSION:- } " == cpu ] ; then
37+ pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cpu -U
38+ else
39+ pip3 install torch torchvision --index-url https://download.pytorch.org/whl/$CU_VERSION -U
40+ fi
3241else
33- pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/$CU_VERSION
42+ printf " Failed to install pytorch"
43+ exit 1
3444fi
3545
3646# smoke test
@@ -40,7 +50,11 @@ python -c "import functorch"
4050pip install git+https://github.com/pytorch/torchsnapshot
4151
4252# install tensordict
43- pip install git+https://github.com/pytorch/tensordict.git
53+ if [[ " $RELEASE " == 0 ]]; then
54+ pip3 install git+https://github.com/pytorch/tensordict.git
55+ else
56+ pip3 install tensordict
57+ fi
4458
4559printf " * Installing torchrl\n"
4660python setup.py develop
Original file line number Diff line number Diff line change @@ -148,7 +148,22 @@ version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")"
148148git submodule sync && git submodule update --init --recursive
149149
150150printf " Installing PyTorch with %s\n" " ${CU_VERSION} "
151- pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/$CU_VERSION
151+ if [[ " $TORCH_VERSION " == " nightly" ]]; then
152+ if [ " ${CU_VERSION:- } " == cpu ] ; then
153+ pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu -U
154+ else
155+ pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/$CU_VERSION
156+ fi
157+ elif [[ " $TORCH_VERSION " == " stable" ]]; then
158+ if [ " ${CU_VERSION:- } " == cpu ] ; then
159+ pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cpu
160+ else
161+ pip3 install torch torchvision --index-url https://download.pytorch.org/whl/$CU_VERSION
162+ fi
163+ else
164+ printf " Failed to install pytorch"
165+ exit 1
166+ fi
152167
153168# smoke test
154169python -c " import functorch"
@@ -157,7 +172,11 @@ python -c "import functorch"
157172pip install git+https://github.com/pytorch/torchsnapshot
158173
159174# install tensordict
160- pip install git+https://github.com/pytorch/tensordict.git
175+ if [[ " $RELEASE " == 0 ]]; then
176+ pip3 install git+https://github.com/pytorch/tensordict.git
177+ else
178+ pip3 install tensordict
179+ fi
161180
162181printf " * Installing torchrl\n"
163182python setup.py develop
Original file line number Diff line number Diff line change 2828# submodules
2929git submodule sync && git submodule update --init --recursive
3030
31- printf " Installing PyTorch with %s\n" " ${CU_VERSION} "
32- if [ " ${CU_VERSION:- } " == cpu ] ; then
33- # conda install -y pytorch torchvision cpuonly -c pytorch-nightly
34- # use pip to install pytorch as conda can frequently pick older release
35- # conda install -y pytorch cpuonly -c pytorch-nightly
36- pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu
31+ printf " Installing PyTorch with cu121"
32+ if [[ " $TORCH_VERSION " == " nightly" ]]; then
33+ if [ " ${CU_VERSION:- } " == cpu ] ; then
34+ pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu -U
35+ else
36+ pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu121 -U
37+ fi
38+ elif [[ " $TORCH_VERSION " == " stable" ]]; then
39+ if [ " ${CU_VERSION:- } " == cpu ] ; then
40+ pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cpu
41+ else
42+ pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu121
43+ fi
3744else
38- pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu121
45+ printf " Failed to install pytorch"
46+ exit 1
3947fi
4048
4149# install tensordict
42- pip install git+https://github.com/pytorch/tensordict.git
50+ if [[ " $RELEASE " == 0 ]]; then
51+ pip3 install git+https://github.com/pytorch/tensordict.git
52+ else
53+ pip3 install tensordict
54+ fi
4355
4456# smoke test
4557python -c " import functorch;import tensordict"
Original file line number Diff line number Diff line change 2525# submodules
2626git submodule sync && git submodule update --init --recursive
2727
28- printf " Installing PyTorch with %s\n" " ${CU_VERSION} "
29- if [ " ${CU_VERSION:- } " == cpu ] ; then
30- # conda install -y pytorch torchvision cpuonly -c pytorch-nightly
31- # use pip to install pytorch as conda can frequently pick older release
32- # conda install -y pytorch cpuonly -c pytorch-nightly
33- pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall --progress-bar off
28+ printf " Installing PyTorch with cu121"
29+ if [[ " $TORCH_VERSION " == " nightly" ]]; then
30+ if [ " ${CU_VERSION:- } " == cpu ] ; then
31+ pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu -U
32+ else
33+ pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 -U
34+ fi
35+ elif [[ " $TORCH_VERSION " == " stable" ]]; then
36+ if [ " ${CU_VERSION:- } " == cpu ] ; then
37+ pip3 install torch --index-url https://download.pytorch.org/whl/cpu
38+ else
39+ pip3 install torch --index-url https://download.pytorch.org/whl/cu121
40+ fi
3441else
35- pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 --force-reinstall --progress-bar off
42+ printf " Failed to install pytorch"
43+ exit 1
3644fi
3745
3846# install tensordict
Original file line number Diff line number Diff line change 2828# submodules
2929git submodule sync && git submodule update --init --recursive
3030
31- printf " Installing PyTorch with %s\n" " ${CU_VERSION} "
32- if [ " ${CU_VERSION:- } " == cpu ] ; then
33- # conda install -y pytorch torchvision cpuonly -c pytorch-nightly
34- # use pip to install pytorch as conda can frequently pick older release
35- # conda install -y pytorch cpuonly -c pytorch-nightly
36- pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall
31+ printf " Installing PyTorch with cu121"
32+ if [[ " $TORCH_VERSION " == " nightly" ]]; then
33+ if [ " ${CU_VERSION:- } " == cpu ] ; then
34+ pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu -U
35+ else
36+ pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 -U
37+ fi
38+ elif [[ " $TORCH_VERSION " == " stable" ]]; then
39+ if [ " ${CU_VERSION:- } " == cpu ] ; then
40+ pip3 install torch --index-url https://download.pytorch.org/whl/cpu
41+ else
42+ pip3 install torch --index-url https://download.pytorch.org/whl/cu121
43+ fi
3744else
38- pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 --force-reinstall
45+ printf " Failed to install pytorch"
46+ exit 1
3947fi
4048
4149# install tensordict
42- pip install git+https://github.com/pytorch/tensordict.git
50+ if [[ " $RELEASE " == 0 ]]; then
51+ pip3 install git+https://github.com/pytorch/tensordict.git
52+ else
53+ pip3 install tensordict
54+ fi
4355
4456# smoke test
4557python -c " import functorch;import tensordict"
Original file line number Diff line number Diff line change 2626# submodules
2727git submodule sync && git submodule update --init --recursive
2828
29- printf " Installing PyTorch with %s\n " " ${CU_VERSION} "
29+ printf " Installing PyTorch with cu121 "
3030if [ " ${CU_VERSION:- } " == cpu ] ; then
31- pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu
31+ pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu -U
3232else
33- pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu118
33+ pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 -U
3434fi
3535
3636# smoke test
Original file line number Diff line number Diff line change 2828# submodules
2929git submodule sync && git submodule update --init --recursive
3030
31- printf " Installing PyTorch with %s\n" " ${CU_VERSION} "
32- if [ " ${CU_VERSION:- } " == cpu ] ; then
33- # conda install -y pytorch torchvision cpuonly -c pytorch-nightly
34- # use pip to install pytorch as conda can frequently pick older release
35- # conda install -y pytorch cpuonly -c pytorch-nightly
36- pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu
31+ printf " Installing PyTorch with cu121"
32+ if [[ " $TORCH_VERSION " == " nightly" ]]; then
33+ if [ " ${CU_VERSION:- } " == cpu ] ; then
34+ pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu -U
35+ else
36+ pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu121 -U
37+ fi
38+ elif [[ " $TORCH_VERSION " == " stable" ]]; then
39+ if [ " ${CU_VERSION:- } " == cpu ] ; then
40+ pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cpu
41+ else
42+ pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu121
43+ fi
3744else
38- pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu121
45+ printf " Failed to install pytorch"
46+ exit 1
3947fi
4048
4149# install tensordict
42- pip install git+https://github.com/pytorch/tensordict.git
50+ if [[ " $RELEASE " == 0 ]]; then
51+ pip3 install git+https://github.com/pytorch/tensordict.git
52+ else
53+ pip3 install tensordict
54+ fi
4355
4456# smoke test
4557python -c " import functorch;import tensordict"
Original file line number Diff line number Diff line change @@ -37,20 +37,32 @@ git submodule sync && git submodule update --init --recursive
3737
3838printf " Installing PyTorch with %s\n" " ${CU_VERSION} "
3939if [ " ${CU_VERSION:- } " == cpu ] ; then
40- conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 cpuonly -c pytorch
40+ conda install pytorch==1.13.1 torchvision==0.14.1 cpuonly -c pytorch
4141else
42- conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.6 -c pytorch -c nvidia -y
42+ conda install pytorch==1.13.1 torchvision==0.14.1 pytorch-cuda=11.6 -c pytorch -c nvidia -y
4343fi
4444
4545# Solving circular import: https://stackoverflow.com/questions/75501048/how-to-fix-attributeerror-partially-initialized-module-charset-normalizer-has
46- pip install -U --force-reinstall charset-normalizer
46+ pip install -U charset-normalizer
4747
4848# install tensordict
49- pip install git+https://github.com/pytorch/tensordict.git
49+ if [[ " $RELEASE " == 0 ]]; then
50+ pip3 install git+https://github.com/pytorch/tensordict.git
51+ else
52+ pip3 install tensordict
53+ fi
5054
5155# smoke test
5256python -c " import tensordict"
5357
5458printf " * Installing torchrl\n"
5559python setup.py develop
5660python -c " import torchrl"
61+
62+ # # Reinstalling pytorch with specific version
63+ # printf "Re-installing PyTorch with %s\n" "${CU_VERSION}"
64+ # if [ "${CU_VERSION:-}" == cpu ] ; then
65+ # conda install pytorch==1.13.1 torchvision==0.14.1 cpuonly -c pytorch
66+ # else
67+ # conda install pytorch==1.13.1 torchvision==0.14.1 pytorch-cuda=11.6 -c pytorch -c nvidia -y
68+ # fi
Original file line number Diff line number Diff line change @@ -20,10 +20,19 @@ version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")"
2020git submodule sync && git submodule update --init --recursive
2121
2222printf " Installing PyTorch with %s\n" " ${CU_VERSION} "
23- pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 --force-reinstall
23+ if [[ " $TORCH_VERSION " == " nightly" ]]; then
24+ pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 -U
25+ elif [[ " $TORCH_VERSION " == " stable" ]]; then
26+ pip3 install torch --index-url https://download.pytorch.org/whl/cu121
27+ fi
2428
2529# install tensordict
26- pip3 install git+https://github.com/pytorch/tensordict.git
30+ # install tensordict
31+ if [[ " $RELEASE " == 0 ]]; then
32+ pip3 install git+https://github.com/pytorch/tensordict.git
33+ else
34+ pip3 install tensordict
35+ fi
2736
2837# smoke test
2938python3 -c " import functorch;import tensordict"
You can’t perform that action at this time.
0 commit comments