@@ -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,14 +64,11 @@ 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
82
74
rmdir /s /q conda
@@ -93,35 +85,25 @@ if errorlevel 1 exit /b 1
93
85
call %CONDA_HOME% \condabin\activate.bat testenv
94
86
if errorlevel 1 exit /b 1
95
87
96
- call conda update -n base -y -c defaults conda
97
-
98
- call conda install %CONDA_EXTRA_ARGS% -yq protobuf numpy
88
+ :: do conda install to make sure all the dependencies are installed
89
+ call conda install -yq pytorch %CONDA_EXTRA_ARGS%
99
90
if ERRORLEVEL 1 exit /b 1
100
91
101
92
set /a CUDA_VER = %CUDA_VERSION%
102
93
set CUDA_VER_MAJOR = %CUDA_VERSION:~0 ,-1 %
103
94
set CUDA_VER_MINOR = %CUDA_VERSION:~-1 ,1 %
104
95
set CUDA_VERSION_STR = %CUDA_VER_MAJOR% .%CUDA_VER_MINOR%
105
96
106
- if " %TEST_NIGHTLY_PACKAGE% " == " 1" (
107
- call internal\install_nightly_package.bat
108
- if errorlevel 1 exit /b 1
109
- goto smoke_test
110
- )
111
-
112
- for /F " delims=" %%i in ('where /R " %PYTORCH_FINAL_PACKAGE_DIR:/ =\ % " *.tar.bz2') do call conda install %CONDA_EXTRA_ARGS% -y " %%i " --offline
97
+ :: Install package we just build
98
+ for /F " delims=" %%i in ('where /R " %PYTORCH_FINAL_PACKAGE_DIR:/ =\ % " *.tar.bz2') do call conda install -yq " %%i " --offline
113
99
if ERRORLEVEL 1 exit /b 1
114
100
115
101
if " %CUDA_VERSION% " == " cpu" goto install_cpu_torch
116
102
117
- :: We do an update --all here since that will install the dependencies for any package that's installed offline
118
- call conda update --all %CONDA_EXTRA_ARGS% -y -c pytorch -c defaults -c numba/label/dev
119
- if ERRORLEVEL 1 exit /b 1
120
-
121
103
goto smoke_test
122
104
123
105
:install_cpu_torch
124
- call conda install %CONDA_EXTRA_ARGS% -y cpuonly -c pytorch
106
+ call conda install %CONDA_EXTRA_ARGS% -y cpuonly -c pytorch-nightly
125
107
if ERRORLEVEL 1 exit /b 1
126
108
127
109
:smoke_test
@@ -165,13 +147,8 @@ echo "install and test libtorch"
165
147
if " %VC_YEAR% " == " 2017" powershell internal\vs2017_install.ps1
166
148
if ERRORLEVEL 1 exit /b 1
167
149
168
- if " %TEST_NIGHTLY_PACKAGE% " == " 1" (
169
- call internal\install_nightly_package.bat
170
- if errorlevel 1 exit /b 1
171
- ) else (
172
- for /F " delims=" %%i in ('where /R " %PYTORCH_FINAL_PACKAGE_DIR:/ =\ % " *-latest.zip') do 7z x " %%i " -otmp
173
- if ERRORLEVEL 1 exit /b 1
174
- )
150
+ for /F " delims=" %%i in ('where /R " %PYTORCH_FINAL_PACKAGE_DIR:/ =\ % " *-latest.zip') do 7z x " %%i " -otmp
151
+ if ERRORLEVEL 1 exit /b 1
175
152
176
153
pushd tmp\libtorch
177
154
0 commit comments