add omegaconf dependency, rework launch scripts to check if venv exists
This commit is contained in:
28
launch.cmd
28
launch.cmd
@@ -1,16 +1,26 @@
|
|||||||
@echo off
|
@echo off
|
||||||
REM Activate Python virtual environment
|
REM Check if .venv exists
|
||||||
cd .
|
if exist .venv (
|
||||||
call .venv\Scripts\activate.bat
|
REM Activate the virtual environment
|
||||||
|
call .venv\Scripts\activate.bat
|
||||||
|
) else (
|
||||||
|
REM Run uv sync if .venv does not exist
|
||||||
|
uv sync
|
||||||
|
call .venv\Scripts\activate.bat
|
||||||
|
)
|
||||||
|
|
||||||
REM Perform a git pull to sync the repository
|
REM Perform a git pull
|
||||||
git pull
|
git pull
|
||||||
|
|
||||||
REM Run uv sync (replace 'uv sync' with the actual command if different)
|
REM Run uv sync if .venv exists (already activated)
|
||||||
uv sync
|
if exist .venv (
|
||||||
|
uv sync
|
||||||
|
)
|
||||||
|
|
||||||
REM Start the Python script
|
REM Start main.py
|
||||||
python main.py
|
python main.py
|
||||||
|
|
||||||
REM Deactivate the virtual environment
|
REM Deactivate the virtual environment if it was activated
|
||||||
deactivate
|
if exist .venv (
|
||||||
|
deactivate
|
||||||
|
)
|
||||||
28
launch.ps1
28
launch.ps1
@@ -1,15 +1,25 @@
|
|||||||
# Activate Python virtual environment
|
# Check if .venv exists
|
||||||
Set-Location -Path "."
|
if (Test-Path .venv) {
|
||||||
.venv\Scripts\Activate.ps1
|
# Activate the virtual environment
|
||||||
|
.\.venv\Scripts\Activate.ps1
|
||||||
|
} else {
|
||||||
|
# Run uv sync if .venv does not exist
|
||||||
|
uv sync
|
||||||
|
.\.venv\Scripts\Activate.ps1
|
||||||
|
}
|
||||||
|
|
||||||
# Perform a git pull to sync the repository
|
# Perform a git pull
|
||||||
git pull
|
git pull
|
||||||
|
|
||||||
# Run uv sync (replace 'uv sync' with the actual command if different)
|
# Run uv sync if .venv exists (already activated)
|
||||||
uv sync
|
if (Test-Path .venv) {
|
||||||
|
uv sync
|
||||||
|
}
|
||||||
|
|
||||||
# Start the Python script
|
# Start main.py
|
||||||
python main.py
|
python main.py
|
||||||
|
|
||||||
# Deactivate the virtual environment
|
# Deactivate the virtual environment if it was activated
|
||||||
deactivate
|
if (Test-Path .venv) {
|
||||||
|
deactivate
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user