From 5bf98a3451794795569418ea8511c2b0f7d838eb Mon Sep 17 00:00:00 2001 From: bruno-f-cruz <7049351+bruno-f-cruz@users.noreply.github.com> Date: Wed, 8 Jan 2025 15:09:04 -0800 Subject: [PATCH] Add scripts --- scripts/regenerate_environment.cmd | 1 + scripts/regenerate_environment.ps1 | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 scripts/regenerate_environment.cmd create mode 100644 scripts/regenerate_environment.ps1 diff --git a/scripts/regenerate_environment.cmd b/scripts/regenerate_environment.cmd new file mode 100644 index 0000000..98b4bba --- /dev/null +++ b/scripts/regenerate_environment.cmd @@ -0,0 +1 @@ +powershell -ExecutionPolicy Bypass -File .\scripts\deploy.ps1 \ No newline at end of file diff --git a/scripts/regenerate_environment.ps1 b/scripts/regenerate_environment.ps1 new file mode 100644 index 0000000..1cfed84 --- /dev/null +++ b/scripts/regenerate_environment.ps1 @@ -0,0 +1,15 @@ +$scriptPath = $MyInvocation.MyCommand.Path +$scriptDirectory = Split-Path -Parent $scriptPath +Set-Location (Split-Path -Parent $scriptDirectory) +Write-Output "Creating a Python environment..." +if (Test-Path -Path ./.venv) { + Remove-Item ./.venv -Recurse -Force +} +&python -m venv ./.venv +.\.venv\Scripts\Activate.ps1 +Write-Output "Installing python packages..." +&pip install .[aind-services] +Write-Output "Creating a Bonsai environment and installing packages..." +Set-Location "bonsai" +.\setup.ps1 +Set-Location .. \ No newline at end of file