Fresh-machine hardening from review
- util: drop dead openai/json/sys/requests/PIL extras (openai import would ImportError before engine load); ultralytics fallback path now raises (AGPL isolation - only MIT icon_detect_v3 ships) - requirements: default path only; paddle + ultralytics moved to README optional section - setup.sh: venv fallback for distros without ensurepip; --skip-weights verified - start.sh: bind 127.0.0.1 by default (LAN = explicit opt-in) - docs: absolute-path !cat examples, HF startup/airgap notes, token placement, security defaults
This commit is contained in:
1 parent
933f33e70a
commit
61a0f353cd
6 files changed
+48
-23
No files matched your search
@@ -20,7 +20,17 @@ command -v python3 >/dev/null || { echo "python3 required (3.10+)"; exit 1; }
|
||||
python3 -c 'import sys; assert sys.version_info >= (3, 10)' || { echo "python >= 3.10 required"; exit 1; }
|
||||
|
||||
echo "== venv"
|
||||
[[ -d .venv ]] || python3 -m venv .venv
|
||||
if ! python3 -m venv .venv 2>/dev/null; then
|
||||
# Debian/Ubuntu ship python3 without ensurepip (python3-venv package):
|
||||
if command -v conda >/dev/null 2>&1; then
|
||||
echo "(system python3 lacks venv support - using conda base python)"
|
||||
"$(conda info --base)/bin/python3" -m venv .venv || { echo "venv creation failed"; exit 1; }
|
||||
else
|
||||
echo "venv creation failed - install python3-venv (apt) or run:"
|
||||
echo " conda create -n omniparse python=3.12 && .venv fallback: OMNI_PYTHON=... (see README)"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
.venv/bin/pip install -q --upgrade pip
|
||||
|
||||
echo "== torch"
|
||||
|
||||
Reference in new issue
Block a user