-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-windows.bat
More file actions
33 lines (27 loc) · 1.02 KB
/
Copy pathsetup-windows.bat
File metadata and controls
33 lines (27 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
@echo off
setlocal
cd /d "%~dp0"
set "CONDA_PREFIX="
set "CONDA_DEFAULT_ENV="
set "CONDA_PROMPT_MODIFIER="
set "CONDA_PYTHON_EXE="
set "CONDA_SHLVL="
set "SAM2_BUILD_CUDA=0"
where uv >nul 2>&1 || (echo uv is required & exit /b 1)
where node >nul 2>&1 || (echo Node.js is required & exit /b 1)
where npm >nul 2>&1 || (echo npm is required & exit /b 1)
echo [1/4] Installing managed Python 3.13...
uv python install 3.13 || exit /b 1
echo [2/4] Syncing locked CUDA + SAM2 environment...
rem Two-phase: install build deps (setuptools/torch) before building sam-2,
rem which is built without isolation against this environment.
uv sync --locked --extra cuda --extra sam2 --no-install-package sam-2 || exit /b 1
uv sync --locked --extra cuda --extra sam2 || exit /b 1
echo [3/4] Building frontend...
pushd frontend
call npm ci || (popd & exit /b 1)
call npm run build || (popd & exit /b 1)
popd
echo [4/4] Verifying GPU and SAM2...
uv run --locked --no-sync python -m web.env_check --backend cuda --download-checkpoint --smoke
exit /b %errorlevel%