Skip to content

Commit

Permalink
Fix conda Windows smoke_test
Browse files Browse the repository at this point in the history
PYTORCH_BUILD_VERSION can be different then the downloaded artifact
  • Loading branch information
mantaionut committed Jan 28, 2024
1 parent b8539eb commit 9da7585
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions windows/internal/smoke_test.bat
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,21 @@ call %CONDA_HOME%\condabin\activate.bat testenv
if errorlevel 1 exit /b 1
set "NO_ARCH_PATH=%PYTORCH_FINAL_PACKAGE_DIR:/=\%\noarch"
mkdir %NO_ARCH_PATH%
for /F "delims=" %%i in ('where /R "%PYTORCH_FINAL_PACKAGE_DIR:/=\%" *') do xcopy "%%i" %NO_ARCH_PATH% /Y
if ERRORLEVEL 1 exit /b 1
for /F "delims=" %%i in ('where /R "%PYTORCH_FINAL_PACKAGE_DIR:/=\%" *') do (
echo Processing file: %%i
:: Extract the version number from the file name
for /f "tokens=2 delims=-" %%a in ("%%~nxi") do (
set "PYTORCH_VERSION=%%a"
echo Version set to: %%a
)
xcopy "%%i" %NO_ARCH_PATH% /Y
)
if errorlevel 1 exit /b 1

call conda index %PYTORCH_FINAL_PACKAGE_DIR%
if errorlevel 1 exit /b 1
call conda install -yq -c "file:///%PYTORCH_FINAL_PACKAGE_DIR%" pytorch==%PYTORCH_BUILD_VERSION% -c pytorch -c numba/label/dev -c nvidia

call conda install -yq -c "file:///%PYTORCH_FINAL_PACKAGE_DIR%" pytorch==%PYTORCH_VERSION% -c pytorch -c numba/label/dev -c nvidia
if ERRORLEVEL 1 exit /b 1
call conda install -yq numpy
if ERRORLEVEL 1 exit /b 1
Expand Down

0 comments on commit 9da7585

Please sign in to comment.