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
124
124
printf " Installing PyTorch with %s\n" " ${CU_VERSION} "
125
125
if [[ " $TORCH_VERSION " == " nightly" ]]; then
126
126
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
128
128
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
130
130
fi
131
131
elif [[ " $TORCH_VERSION " == " stable" ]]; then
132
132
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
134
134
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
136
136
fi
137
137
else
138
138
printf " Failed to install pytorch"
@@ -150,7 +150,11 @@ else
150
150
fi
151
151
152
152
# 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
154
158
155
159
printf " * Installing torchrl\n"
156
160
python setup.py develop
Original file line number Diff line number Diff line change 26
26
# submodules
27
27
git submodule sync && git submodule update --init --recursive
28
28
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
32
41
else
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
34
44
fi
35
45
36
46
# smoke test
@@ -40,7 +50,11 @@ python -c "import functorch"
40
50
pip install git+https://github.com/pytorch/torchsnapshot
41
51
42
52
# 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
44
58
45
59
printf " * Installing torchrl\n"
46
60
python 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]))")"
148
148
git submodule sync && git submodule update --init --recursive
149
149
150
150
printf " 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
152
167
153
168
# smoke test
154
169
python -c " import functorch"
@@ -157,7 +172,11 @@ python -c "import functorch"
157
172
pip install git+https://github.com/pytorch/torchsnapshot
158
173
159
174
# 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
161
180
162
181
printf " * Installing torchrl\n"
163
182
python setup.py develop
Original file line number Diff line number Diff line change 28
28
# submodules
29
29
git submodule sync && git submodule update --init --recursive
30
30
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
37
44
else
38
- pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu121
45
+ printf " Failed to install pytorch"
46
+ exit 1
39
47
fi
40
48
41
49
# 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
43
55
44
56
# smoke test
45
57
python -c " import functorch;import tensordict"
Original file line number Diff line number Diff line change 25
25
# submodules
26
26
git submodule sync && git submodule update --init --recursive
27
27
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
34
41
else
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
36
44
fi
37
45
38
46
# install tensordict
Original file line number Diff line number Diff line change 28
28
# submodules
29
29
git submodule sync && git submodule update --init --recursive
30
30
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
37
44
else
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
39
47
fi
40
48
41
49
# 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
43
55
44
56
# smoke test
45
57
python -c " import functorch;import tensordict"
Original file line number Diff line number Diff line change 26
26
# submodules
27
27
git submodule sync && git submodule update --init --recursive
28
28
29
- printf " Installing PyTorch with %s\n " " ${CU_VERSION} "
29
+ printf " Installing PyTorch with cu121 "
30
30
if [ " ${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
32
32
else
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
34
34
fi
35
35
36
36
# smoke test
Original file line number Diff line number Diff line change 28
28
# submodules
29
29
git submodule sync && git submodule update --init --recursive
30
30
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
37
44
else
38
- pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu121
45
+ printf " Failed to install pytorch"
46
+ exit 1
39
47
fi
40
48
41
49
# 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
43
55
44
56
# smoke test
45
57
python -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
37
37
38
38
printf " Installing PyTorch with %s\n" " ${CU_VERSION} "
39
39
if [ " ${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
41
41
else
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
43
43
fi
44
44
45
45
# 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
47
47
48
48
# 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
50
54
51
55
# smoke test
52
56
python -c " import tensordict"
53
57
54
58
printf " * Installing torchrl\n"
55
59
python setup.py develop
56
60
python -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]))")"
20
20
git submodule sync && git submodule update --init --recursive
21
21
22
22
printf " 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
24
28
25
29
# 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
27
36
28
37
# smoke test
29
38
python3 -c " import functorch;import tensordict"
You can’t perform that action at this time.
0 commit comments