RescueAI / start.bat
Nisanth
chore : inital commit
4bab068
Raw
History Blame Contribute Delete
1.38 kB
@echo off
REM ============================================================
REM ONE COMMAND: sets up (first run) AND launches the app.
REM Everything (venv + downloaded models) is kept INSIDE this
REM folder, on whatever drive you copied it to. Nothing is
REM installed system-wide. To clean up later: delete this folder.
REM ============================================================
setlocal
cd /d "%~dp0"
REM --- Point ALL caches (pip venv, HuggingFace, Torch, Ultralytics) at THIS folder ---
set "HF_HOME=%~dp0models_cache\huggingface"
set "TRANSFORMERS_CACHE=%~dp0models_cache\huggingface"
set "TORCH_HOME=%~dp0models_cache\torch"
set "ULTRALYTICS_CONFIG_DIR=%~dp0models_cache\ultralytics"
set "PIP_CACHE_DIR=%~dp0models_cache\pip"
if not exist "models_cache" mkdir "models_cache"
if not exist ".venv\Scripts\activate.bat" (
echo [1/3] No environment found — creating one in .venv ...
python -m venv .venv
if errorlevel 1 (
echo ERROR: Python not found on PATH. Install Python 3.10+ and re-run this script.
pause
exit /b 1
)
)
echo [2/3] Activating environment and installing/checking dependencies...
call .venv\Scripts\activate.bat
python -m pip install --upgrade pip >nul
pip install -r requirements.txt
echo [3/3] Launching app (first launch also downloads ~7GB of models into models_cache\)...
python app.py
pause