-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpost_install.bat
More file actions
40 lines (36 loc) · 1.65 KB
/
post_install.bat
File metadata and controls
40 lines (36 loc) · 1.65 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
:: Post-Installation script ::::::::::::::::::::::::::::::::::::::::::::::::::::
::
:: Object Detection (Coral)
::
:: The setup.bat file will find this post_install.bat file and execute it.
::
:: For help with install scripts, notes on variables and methods available, tips,
:: and explanations, see /src/modules/install_script_help.md
@if "%1" NEQ "post-install" (
echo This script is only called from ..\..\CodeProject.AI-Server\src\setup.bat
@pause
@goto:eof
)
REM Install optimized Pillow-SIMD or fallback to keeping regular Pillow
REM Used for fast image image resizing operations with SSE4 or AVX2
REM See also: https://python-pillow.org/pillow-perf/
REM THIS FAILS CATASTROPHICALLY.
REM
REM REM Uninstall current Pillow and try installing Pillow-SIMD
REM call "!utilsScript!" WriteLine "Upgrading PIP. Again..." "!color_info!"
REM "!venvPythonCmdPath!" -m pip install -U --force-reinstall pip
REM
REM call "!utilsScript!" WriteLine "Uninstalling Pillow..." "!color_info!"
REM "!venvPythonCmdPath!" -m pip uninstall --yes pillow >NUL
REM
REM call "!utilsScript!" WriteLine "Installing Pillow-SIMD..." "!color_info!"
REM "!venvPythonCmdPath!" -m pip install pillow-simd >NUL
REM
REM REM If that didn't work, undo what we did and put back Pillow
REM if errorlevel 1 (
REM call "!utilsScript!" WriteLine "Pillow-SIMD install failed. Restoring Pillow..." "!color_warn!"
REM "!venvPythonCmdPath!" -m pip uninstall --yes pillow-simd >NUL
REM "!venvPythonCmdPath!" -m pip install Pillow>=4.0.0 >NUL
REM }
REM TODO: Check assets created and has files
REM set moduleInstallErrors=...