@@ -54,7 +54,7 @@ if errorlevel 1 exit /b 1
5454
5555set " PATH = %CD% \Python%PYTHON_VERSION% \Scripts;%CD% \Python;%PATH% "
5656
57- pip install -q numpy protobuf " mkl>=2019 "
57+ pip install -q numpy protobuf
5858if errorlevel 1 exit /b 1
5959
6060for /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%"
8787
8888conda create -qyn testenv python=%DESIRED_PYTHON%
8989if errorlevel 1 exit /b 1
90-
90+ call conda install -yq conda-build
91+ if errorlevel 1 exit /b 1
9192call %CONDA_HOME% \condabin\activate.bat testenv
9293if 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
93101
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%
98102if ERRORLEVEL 1 exit /b 1
99103
100104set /a CUDA_VER = %CUDA_VERSION%
@@ -103,8 +107,7 @@ set CUDA_VER_MINOR=%CUDA_VERSION:~-1,1%
103107set CUDA_VERSION_STR = %CUDA_VER_MAJOR% .%CUDA_VER_MINOR%
104108
105109:: 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+
108111
109112:smoke_test
110113python -c " import torch"
0 commit comments