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