Initial commit
This commit is contained in:
20
run.sh
Executable file
20
run.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# Python Homebrew en priorité (le python système 3.9 est trop vieux pour Playwright récent)
|
||||
if [ -x /opt/homebrew/bin/python3 ]; then
|
||||
PY=/opt/homebrew/bin/python3
|
||||
else
|
||||
PY=$(command -v python3)
|
||||
fi
|
||||
|
||||
if [ ! -d .venv ]; then
|
||||
echo "Première installation (environnement Python + Chromium), patientez quelques minutes..."
|
||||
"$PY" -m venv .venv
|
||||
.venv/bin/pip install --upgrade pip
|
||||
.venv/bin/pip install -r requirements.txt
|
||||
.venv/bin/playwright install chromium
|
||||
fi
|
||||
|
||||
exec .venv/bin/python app.py
|
||||
Reference in New Issue
Block a user