This commit is contained in:
unknown
2025-12-27 05:55:26 -08:00
parent 8efe1e9c06
commit bb4f763c1c
3 changed files with 3 additions and 3 deletions

View File

@@ -639,7 +639,7 @@ if defined arguments.help (
set "TAG=%DEVICE_TAG%"
)
call docker image inspect "%DOCKER_IMG_NAME%:%TAG%" >nul 2>&1
if errorlevel 0 (
if not errorlevel 1 (
echo [STOP] Docker image '%DOCKER_IMG_NAME%:%TAG%' already exists. Aborting build.
echo Delete it using: docker rmi %DOCKER_IMG_NAME%:%TAG% --force
goto :failed

View File

@@ -784,7 +784,7 @@ else
echo "check_device_info() error: result is empty"
exit 1
fi
TAG=${DEVICE_TAG:-$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["tag"])' "$device_info_str")}
export TAG=${DEVICE_TAG:-$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["tag"])' "$device_info_str")}
if docker image inspect "${DOCKER_IMG_NAME}:${TAG}" >/dev/null 2>&1; then
echo "[STOP] Docker image '${DOCKER_IMG_NAME}:${TAG}' already exists. Aborting build."
echo "Delete it using: docker rmi ${DOCKER_IMG_NAME}:${TAG} --force"

View File

@@ -741,7 +741,7 @@ class DeviceInstaller():
#torch_pkg = f'{url}/{tag}/torch-{torch_version_base}%2B{tag}-{tag_py}-{os_env}_{arch}.whl'
#torchaudio_pkg = f'{url}/{tag}/torchaudio-{torch_version_base}%2B{tag}-{tag_py}-{os_env}_{arch}.whl'
#subprocess.check_call([sys.executable, '-m', 'pip', 'install', '--upgrade', '--no-cache-dir', torch_pkg, torchaudio_pkg])
subprocess.check_call([sys.executable, '-m', 'pip', 'install', '--no-cache-dir', f'torch=={torch_version_base}', f'torchaudio=={torch_version_base}', '--force', '--index-url', f'https://download.pytorch.org/whl/{tag}'])
subprocess.check_call([sys.executable, '-m', 'pip', 'install', '--no-cache-dir', f'torch=={torch_version_base}', f'torchaudio=={torch_version_base}', '--force-reinstall', '--index-url', f'https://download.pytorch.org/whl/{tag}'])
if Version(torch_version_base) <= Version('2.2.2') and Version(numpy_version_base) >= Version('2.0.0'):
subprocess.check_call([sys.executable, '-m', 'pip', 'install', '--upgrade', '--no-cache-dir', 'numpy<2'])
except subprocess.CalledProcessError as e: