Update README and entrypoint.sh: Enhance Docker setup instructions and improve ComfyUI-Manager configuration handling
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# ComfyUI Docker Build File by John Aldred
|
# ComfyUI Docker Build File v1.0.1 by John Aldred
|
||||||
# https://www.johnaldred.com
|
# https://www.johnaldred.com
|
||||||
# https://github.com/kaouthia
|
# https://github.com/kaouthia
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ And update the paths in `docker-compose.yml` to match your actual folder locatio
|
|||||||
From the project directory, run:
|
From the project directory, run:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker compose up --build
|
docker compose build --no-cache && docker compose up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
The first run may take several minutes as it downloads the latest version of ComfyUI and its dependencies as well as the latest versions of the custom nodes listed below, along with their dependencies.
|
The first run may take several minutes as it downloads the latest version of ComfyUI and its dependencies as well as the latest versions of the custom nodes listed below, along with their dependencies.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# ComfyUI Docker Compose File by John Aldred
|
# ComfyUI Docker Compose File v1.0.1 by John Aldred
|
||||||
# http://www.johnaldred.com
|
# http://www.johnaldred.com
|
||||||
# http://github.com/kaouthia
|
# http://github.com/kaouthia
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,60 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# ComfyUI Docker Startup File by John Aldred
|
# ComfyUI Docker Startup File v1.0.2 by John Aldred
|
||||||
# http://www.johnaldred.com
|
# http://www.johnaldred.com
|
||||||
# http://github.com/kaouthia
|
# http://github.com/kaouthia
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# --- Force ComfyUI-Manager config (uv off, no file logging, safe DB) ---
|
||||||
|
# Make sure user dirs exist and are writable (handles Windows bind mounts)
|
||||||
|
mkdir -p /app/ComfyUI/user /app/ComfyUI/user/default
|
||||||
|
chown -R "$(id -u)":"$(id -g)" /app/ComfyUI/user || true
|
||||||
|
chmod -R u+rwX /app/ComfyUI/user || true
|
||||||
|
|
||||||
|
CFG_DIR="/app/ComfyUI/user/default/ComfyUI-Manager"
|
||||||
|
CFG_FILE="$CFG_DIR/config.ini"
|
||||||
|
DB_DIR="$CFG_DIR"
|
||||||
|
DB_PATH="${DB_DIR}/manager.db"
|
||||||
|
SQLITE_URL="sqlite:////${DB_PATH}"
|
||||||
|
|
||||||
|
mkdir -p "$CFG_DIR"
|
||||||
|
|
||||||
|
if [ ! -f "$CFG_FILE" ]; then
|
||||||
|
echo "↳ Creating ComfyUI-Manager config.ini (uv OFF, no file logging, DB cache)"
|
||||||
|
cat > "$CFG_FILE" <<EOF
|
||||||
|
[default]
|
||||||
|
use_uv = False
|
||||||
|
file_logging = False
|
||||||
|
db_mode = cache
|
||||||
|
database_url = ${SQLITE_URL}
|
||||||
|
EOF
|
||||||
|
else
|
||||||
|
echo "↳ Updating ComfyUI-Manager config.ini (uv OFF, no file logging, DB cache)"
|
||||||
|
# use_uv = False
|
||||||
|
grep -q '^use_uv' "$CFG_FILE" \
|
||||||
|
&& sed -i 's/^use_uv.*/use_uv = False/' "$CFG_FILE" \
|
||||||
|
|| printf '\nuse_uv = False\n' >> "$CFG_FILE"
|
||||||
|
|
||||||
|
# file_logging = False (and drop any existing log_path line)
|
||||||
|
grep -q '^file_logging' "$CFG_FILE" \
|
||||||
|
&& sed -i 's/^file_logging.*/file_logging = False/' "$CFG_FILE" \
|
||||||
|
|| printf '\nfile_logging = False\n' >> "$CFG_FILE"
|
||||||
|
sed -i '/^log_path[[:space:]=]/d' "$CFG_FILE" || true
|
||||||
|
|
||||||
|
# db_mode = cache (prevents file DB usage)
|
||||||
|
grep -q '^db_mode' "$CFG_FILE" \
|
||||||
|
&& sed -i 's/^db_mode.*/db_mode = cache/' "$CFG_FILE" \
|
||||||
|
|| printf '\ndb_mode = cache\n' >> "$CFG_FILE"
|
||||||
|
|
||||||
|
# Provide a safe DB URL anyway (future-proof if Manager flips off cache)
|
||||||
|
grep -q '^database_url' "$CFG_FILE" \
|
||||||
|
&& sed -i "s|^database_url.*|database_url = ${SQLITE_URL}|" "$CFG_FILE" \
|
||||||
|
|| printf "database_url = ${SQLITE_URL}\n" >> "$CFG_FILE"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# --- Prepare custom nodes ---
|
||||||
CN_DIR=/app/ComfyUI/custom_nodes
|
CN_DIR=/app/ComfyUI/custom_nodes
|
||||||
INIT_MARKER="$CN_DIR/.custom_nodes_initialized"
|
INIT_MARKER="$CN_DIR/.custom_nodes_initialized"
|
||||||
|
|
||||||
@@ -37,7 +86,7 @@ if [ ! -f "$INIT_MARKER" ]; then
|
|||||||
req="$dir/requirements.txt"
|
req="$dir/requirements.txt"
|
||||||
if [ -f "$req" ]; then
|
if [ -f "$req" ]; then
|
||||||
echo " ↳ pip install --upgrade -r $req"
|
echo " ↳ pip install --upgrade -r $req"
|
||||||
pip install --no-cache-dir --upgrade -r "$req"
|
python -m pip install --no-cache-dir --upgrade -r "$req"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -48,4 +97,4 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "↳ Launching ComfyUI"
|
echo "↳ Launching ComfyUI"
|
||||||
exec "$@"
|
exec "$@"
|
||||||
Reference in New Issue
Block a user