@@ -51,13 +51,8 @@ set "PATH=%CD%\Python%PYTHON_VERSION%\Scripts;%CD%\Python;%PATH%"
51
51
pip install -q numpy protobuf " mkl>=2019"
52
52
if errorlevel 1 exit /b 1
53
53
54
- if " %TEST_NIGHTLY_PACKAGE% " == " 1" (
55
- call internal\install_nightly_package.bat
56
- if errorlevel 1 exit /b 1
57
- ) else (
58
- for /F " delims=" %%i in ('where /R " %PYTORCH_FINAL_PACKAGE_DIR:/ =\ % " *.whl') do pip install " %%i "
59
- if errorlevel 1 exit /b 1
60
- )
54
+ for /F " delims=" %%i in ('where /R " %PYTORCH_FINAL_PACKAGE_DIR:/ =\ % " *.whl') do pip install " %%i "
55
+ if errorlevel 1 exit /b 1
61
56
62
57
goto smoke_test
63
58
@@ -69,17 +64,14 @@ set "CONDA_HOME=%CD%\conda"
69
64
set " tmp_conda = %CONDA_HOME% "
70
65
set " miniconda_exe = %CD% \miniconda.exe"
71
66
set " CONDA_EXTRA_ARGS = "
72
- if " %CUDA_VERSION% " == " 115" (
73
- set " CONDA_EXTRA_ARGS = -c=nvidia"
74
- )
75
67
if " %CUDA_VERSION% " == " 116" (
76
- set " CONDA_EXTRA_ARGS = -c= nvidia"
68
+ set " CONDA_EXTRA_ARGS = pytorch-cuda=11.6 -c nvidia -c pytorch-nightly "
77
69
)
78
70
if " %CUDA_VERSION% " == " 117" (
79
- set " CONDA_EXTRA_ARGS = -c= nvidia"
71
+ set " CONDA_EXTRA_ARGS = pytorch-cuda=11.7 -c nvidia -c pytorch-nightly "
80
72
)
81
73
if " %CUDA_VERSION% " == " 118" (
82
- set " CONDA_EXTRA_ARGS = -c= nvidia"
74
+ set " CONDA_EXTRA_ARGS = pytorch-cuda=11.8 -c nvidia -c pytorch-nightly "
83
75
)
84
76
85
77
rmdir /s /q conda
@@ -96,35 +88,25 @@ if errorlevel 1 exit /b 1
96
88
call %CONDA_HOME% \condabin\activate.bat testenv
97
89
if errorlevel 1 exit /b 1
98
90
99
- call conda update -n base -y -c defaults conda
100
-
101
- call conda install %CONDA_EXTRA_ARGS% -yq protobuf numpy
91
+ :: do conda install to make sure all the dependencies are installed
92
+ call conda install -yq pytorch %CONDA_EXTRA_ARGS%
102
93
if ERRORLEVEL 1 exit /b 1
103
94
104
95
set /a CUDA_VER = %CUDA_VERSION%
105
96
set CUDA_VER_MAJOR = %CUDA_VERSION:~0 ,-1 %
106
97
set CUDA_VER_MINOR = %CUDA_VERSION:~-1 ,1 %
107
98
set CUDA_VERSION_STR = %CUDA_VER_MAJOR% .%CUDA_VER_MINOR%
108
99
109
- if " %TEST_NIGHTLY_PACKAGE% " == " 1" (
110
- call internal\install_nightly_package.bat
111
- if errorlevel 1 exit /b 1
112
- goto smoke_test
113
- )
114
-
115
- for /F " delims=" %%i in ('where /R " %PYTORCH_FINAL_PACKAGE_DIR:/ =\ % " *.tar.bz2') do call conda install %CONDA_EXTRA_ARGS% -y " %%i " --offline
100
+ :: Install package we just build
101
+ for /F " delims=" %%i in ('where /R " %PYTORCH_FINAL_PACKAGE_DIR:/ =\ % " *.tar.bz2') do call conda install -yq " %%i " --offline
116
102
if ERRORLEVEL 1 exit /b 1
117
103
118
104
if " %CUDA_VERSION% " == " cpu" goto install_cpu_torch
119
105
120
- :: We do an update --all here since that will install the dependencies for any package that's installed offline
121
- call conda update --all %CONDA_EXTRA_ARGS% -y -c pytorch -c defaults -c numba/label/dev
122
- if ERRORLEVEL 1 exit /b 1
123
-
124
106
goto smoke_test
125
107
126
108
:install_cpu_torch
127
- call conda install %CONDA_EXTRA_ARGS% -y cpuonly -c pytorch
109
+ call conda install %CONDA_EXTRA_ARGS% -y cpuonly -c pytorch-nightly
128
110
if ERRORLEVEL 1 exit /b 1
129
111
130
112
:smoke_test
@@ -168,13 +150,8 @@ echo "install and test libtorch"
168
150
if " %VC_YEAR% " == " 2017" powershell internal\vs2017_install.ps1
169
151
if ERRORLEVEL 1 exit /b 1
170
152
171
- if " %TEST_NIGHTLY_PACKAGE% " == " 1" (
172
- call internal\install_nightly_package.bat
173
- if errorlevel 1 exit /b 1
174
- ) else (
175
- for /F " delims=" %%i in ('where /R " %PYTORCH_FINAL_PACKAGE_DIR:/ =\ % " *-latest.zip') do 7z x " %%i " -otmp
176
- if ERRORLEVEL 1 exit /b 1
177
- )
153
+ for /F " delims=" %%i in ('where /R " %PYTORCH_FINAL_PACKAGE_DIR:/ =\ % " *-latest.zip') do 7z x " %%i " -otmp
154
+ if ERRORLEVEL 1 exit /b 1
178
155
179
156
pushd tmp\libtorch
180
157
0 commit comments