Repository navigation
Expand file tree
/
Copy pathRUN_ME.bat
More file actions
67 lines (58 loc) · 2.15 KB
/
Copy pathRUN_ME.bat
File metadata and controls
67 lines (58 loc) · 2.15 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
@echo off
echo ===================================================
echo Slurm Run Bundle Generator - Auto Start Script
echo ===================================================
:: Ensure script always runs from its own containing directory
cd /d "%~dp0"
echo [INFO] Searching for Python/Conda installation...
set "CONDA_ACTIVATE="
:: Check common installation paths
for %%p in (
"%USERPROFILE%\anaconda3\Scripts\activate.bat"
"%USERPROFILE%\miniconda3\Scripts\activate.bat"
"%PROGRAMDATA%\anaconda3\Scripts\activate.bat"
"%PROGRAMDATA%\miniconda3\Scripts\activate.bat"
"C:\anaconda3\Scripts\activate.bat"
"C:\miniconda3\Scripts\activate.bat"
"C:\Program Files\anaconda3\Scripts\activate.bat"
) do (
if exist %%p (
set "CONDA_ACTIVATE=%%~p"
goto :conda_found
)
)
:conda_not_found
echo.
echo [ERROR] Anaconda or Miniconda could not be found in standard locations.
echo ---------------------------------------------------
echo MISSING DOWNLOAD: Anaconda / Miniconda 3
echo ---------------------------------------------------
echo To fix this, please install Miniconda:
echo Download: https://docs.conda.io/en/latest/miniconda.html
echo Installation Tip: When installing, choose "Just Me" so it installs to your %%USERPROFILE%% folder.
echo.
pause
exit /b 1
:conda_found
echo [INFO] Found Conda environment script at: "%CONDA_ACTIVATE%"
call "%CONDA_ACTIVATE%"
echo [INFO] Checking for 'stitch_app' workspace environment...
call conda env list | findstr /i "stitch_app" >nul
if errorlevel 1 (
echo [INFO] Environment 'stitch_app' not found. Creating it immediately ^(Python 3.9^)...
call conda create -n stitch_app python=3.9 -y
call conda activate stitch_app
) else (
echo [INFO] Environment 'stitch_app' formally found. Activating...
call conda activate stitch_app
)
echo [INFO] Ensuring required Python packages from requirements.txt are installed...
pip install -r requirements.txt
echo.
echo [INFO] Starting the Streamlit Graphical Interface...
echo Please do not close this black window while using the application!
echo.
streamlit run app.py
echo.
echo [INFO] Streamlit session ended or encountered a terminal error.
pause