Fix stale UI cache, BEN2 edge quality, and fresh-install permissions
- Serve /dist and /src with Cache-Control: no-cache so browsers always revalidate the webpack bundle (it has a fixed filename with no content hash, so a stale browser cache was hiding the new Remove Background model dropdown after the rebuild). - Enable BEN2's refine_foreground pass by default - it's the model's own documented option for preserving fine/semi-transparent edge detail (text borders, light rays) instead of a harder cutout, at a small speed cost. - Make install-local-gpu.sh and bring-up-local-gpu.sh pre-create ./data as the invoking non-root user before Docker ever runs, so its daemon never gets a chance to auto-create those bind-mount dirs as root. - Make prefetch-models.sh self-heal a root-owned ./data automatically (sudo chown) instead of erroring out with a manual fix-it command. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ro4PwQKvSc3CH19LSN21Ht
This commit is contained in:
@@ -80,6 +80,18 @@ fi
|
||||
|
||||
echo ""
|
||||
|
||||
# ── 0.5. Pre-create ./data with correct ownership ────────────────────────────
|
||||
# Docker's daemon (always root) auto-creates bind-mount source directories on
|
||||
# the first 'compose up' if they don't exist yet — leaving ./data root-owned
|
||||
# and blocking the invoking user from later running ./prefetch-models.sh
|
||||
# without a manual 'sudo chown'. Create it now, owned by the real (non-root)
|
||||
# user, so that problem has no chance to happen on a fresh checkout.
|
||||
REPO_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
mkdir -p "$REPO_DIR"/data/{models,hf_cache,projects,patches}
|
||||
chown -R "${SUDO_UID:-$(id -u)}:${SUDO_GID:-$(id -g)}" "$REPO_DIR/data"
|
||||
echo "✓ ./data prepared (writable without sudo)"
|
||||
echo ""
|
||||
|
||||
# ── 1. NVIDIA container toolkit ──────────────────────────────────────────────
|
||||
if command -v nvidia-ctk &>/dev/null; then
|
||||
echo "✓ nvidia-container-toolkit already installed — skipping"
|
||||
|
||||
Reference in New Issue
Block a user