@@ -54,7 +54,7 @@ if errorlevel 1 exit /b 1
54
54
55
55
set " PATH = %CD% \Python%PYTHON_VERSION% \Scripts;%CD% \Python;%PATH% "
56
56
57
- pip install -q numpy protobuf " mkl>=2019 "
57
+ pip install -q numpy protobuf
58
58
if errorlevel 1 exit /b 1
59
59
60
60
for /F " delims=" %%i in ('where /R " %PYTORCH_FINAL_PACKAGE_DIR:/ =\ % " *.whl') do pip install " %%i "
@@ -87,14 +87,18 @@ set "PATH=%CONDA_HOME%;%CONDA_HOME%\scripts;%CONDA_HOME%\Library\bin;%PATH%"
87
87
88
88
conda create -qyn testenv python=%DESIRED_PYTHON%
89
89
if errorlevel 1 exit /b 1
90
-
90
+ call conda install -yq conda-build
91
+ if errorlevel 1 exit /b 1
91
92
call %CONDA_HOME% \condabin\activate.bat testenv
92
93
if errorlevel 1 exit /b 1
94
+ set " NO_ARCH_PATH = %PYTORCH_FINAL_PACKAGE_DIR:/ =\ % \noarch"
95
+ mkdir %NO_ARCH_PATH%
96
+ for /F " delims=" %%i in ('where /R " %PYTORCH_FINAL_PACKAGE_DIR:/ =\ % " *') do xcopy " %%i " %NO_ARCH_PATH% /Y
97
+ if ERRORLEVEL 1 exit /b 1
98
+ call conda index %PYTORCH_FINAL_PACKAGE_DIR%
99
+ if errorlevel 1 exit /b 1
100
+ call conda install -yq -c " file:///%PYTORCH_FINAL_PACKAGE_DIR% " pytorch== %PYTORCH_BUILD_VERSION% -c pytorch -c numba/label/dev -c nvidia
93
101
94
- :: do conda install to make sure all the dependencies are installed
95
- :: Install numpy see: https://github.com/pytorch/pytorch/issues/107228
96
- :: todo: Remove numpy install once the issue above is resolved
97
- call conda install -yq numpy pytorch %CONDA_EXTRA_ARGS%
98
102
if ERRORLEVEL 1 exit /b 1
99
103
100
104
set /a CUDA_VER = %CUDA_VERSION%
@@ -103,8 +107,7 @@ set CUDA_VER_MINOR=%CUDA_VERSION:~-1,1%
103
107
set CUDA_VERSION_STR = %CUDA_VER_MAJOR% .%CUDA_VER_MINOR%
104
108
105
109
:: Install package we just build
106
- for /F " delims=" %%i in ('where /R " %PYTORCH_FINAL_PACKAGE_DIR:/ =\ % " *.tar.bz2') do call conda install -yq " %%i " --offline
107
- if ERRORLEVEL 1 exit /b 1
110
+
108
111
109
112
:smoke_test
110
113
python -c " import torch"
0 commit comments