Add start-gpu.sh: auto-applies iptables DNS fix before container start

The iptables DOCKER-USER rule is lost on reboot; the script re-applies
it each run, checks for duplicates, and is silently skipped on macOS/WSL.
Default behaviour (no args): docker compose up -d --build.
All docker compose subcommands can be passed as args (logs, down, etc.).
README Quick Start and Updates sections now reference ./start-gpu.sh.

https://claude.ai/code/session_01WVDg7amsy1TTtxvpku7bcM
This commit is contained in:
Claude
2026-06-14 00:58:43 +00:00
parent ce29cc1d30
commit 7cfbb6034f
2 changed files with 37 additions and 4 deletions
+5 -4
View File
@@ -24,7 +24,8 @@ docker run --rm --gpus all nvidia/cuda:12.1.0-base-ubuntu22.04 nvidia-smi
# Clone and run:
git clone https://github.com/outis1one/editmaskwithai
cd editmaskwithai
docker compose -f docker-compose.gpu.yml up --build
chmod +x start-gpu.sh
./start-gpu.sh
```
Open **http://localhost:3080**
@@ -52,15 +53,15 @@ Open **http://localhost:3080**
```bash
git pull
# GPU:
docker compose -f docker-compose.gpu.yml up -d --build
# or cloud:
./start-gpu.sh # applies DNS fix then rebuilds + starts
# or cloud (no GPU):
docker compose up -d --build
```
If pip packages seem stale after a pull (e.g., wrong diffusers version), force a pip layer rebuild without re-downloading the entire PyTorch base image:
```bash
BUILDID=$(date +%s) docker compose -f docker-compose.gpu.yml up -d --build
BUILDID=$(date +%s) ./start-gpu.sh --build
```
---