-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Expand file tree
/
Copy path_build-exe.ps1
More file actions
executable file
·23 lines (19 loc) · 724 Bytes
/
_build-exe.ps1
File metadata and controls
executable file
·23 lines (19 loc) · 724 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Install Poetry if not already installed
if (-not (Get-Command poetry -ErrorAction SilentlyContinue)) {
pip install poetry
}
# Install pyinstaller
pip install pyinstaller
# Build CPU version
Write-Host "Building CPU version..." -ForegroundColor Cyan
poetry install --extras "cli cpu"
poetry run pyinstaller rembg.spec
Rename-Item -Path "dist/rembg" -NewName "rembg-cpu"
# Build GPU version
Write-Host "Building GPU version..." -ForegroundColor Cyan
poetry install --extras "cli gpu"
poetry run pyinstaller rembg.spec --noconfirm
Rename-Item -Path "dist/rembg" -NewName "rembg-gpu"
Write-Host "Build complete!" -ForegroundColor Green
Write-Host "CPU version: dist/rembg-cpu"
Write-Host "GPU version: dist/rembg-gpu"