ModelHandle/tools/step_service/setup_portable_python.bat
sladro 16a2e43649
Some checks failed
Build / build (18.x, macos-latest) (push) Has been cancelled
Build / build (18.x, ubuntu-latest) (push) Has been cancelled
Build / build (18.x, windows-latest) (push) Has been cancelled
Build / build (20.x, macos-latest) (push) Has been cancelled
Build / build (20.x, ubuntu-latest) (push) Has been cancelled
Build / build (20.x, windows-latest) (push) Has been cancelled
fix step save flow and add portable backend runtime support
2026-04-13 15:16:30 +08:00

17 lines
500 B
Batchfile

@echo off
setlocal
set "SCRIPT_DIR=%~dp0"
set "PROJECT_ROOT=%SCRIPT_DIR%..\.."
set "PYTHON_EXE=%PROJECT_ROOT%\runtime\python\python.exe"
set "REQUIREMENTS_FILE=%SCRIPT_DIR%requirements.txt"
set "PYTHONNOUSERSITE=1"
if not exist "%PYTHON_EXE%" (
echo [step_service] Missing portable Python: "%PYTHON_EXE%"
echo [step_service] Copy a full Python runtime into "runtime\python" first.
exit /b 1
)
"%PYTHON_EXE%" -m pip install --isolated --no-warn-script-location -r "%REQUIREMENTS_FILE%"