mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-12-17 01:52:59 +08:00
[ENV-4] Add Nano Banana installation support and fix entrypoint venv check
- Fix venv creation check to look for bin/activate instead of directory - Add INSTALL_NANO_BANANA env var to entrypoint for automatic installation - Add COMFYUI_ARGS support to pass arguments to ComfyUI (e.g., --cpu) - Configure CPU mode for testing without GPU - Update comfy-node-install to disable git terminal prompts Note: Nano Banana repository URL needs verification (current URL returns 404)
This commit is contained in:
parent
9cbe8f13d1
commit
d2ed468e80
@ -5,7 +5,7 @@ services:
|
|||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
container_name: comfyui
|
container_name: comfyui
|
||||||
ports:
|
ports:
|
||||||
- "8188:8188"
|
- "8189:8188"
|
||||||
# Temporarily disabled for testing without GPU
|
# Temporarily disabled for testing without GPU
|
||||||
# deploy:
|
# deploy:
|
||||||
# resources:
|
# resources:
|
||||||
@ -30,6 +30,8 @@ services:
|
|||||||
- TZ=America/Chicago
|
- TZ=America/Chicago
|
||||||
- PUID=1000
|
- PUID=1000
|
||||||
- PGID=1000
|
- PGID=1000
|
||||||
|
- COMFYUI_ARGS=--cpu
|
||||||
|
- INSTALL_NANO_BANANA=true
|
||||||
# OpenTelemetry environment variables (optional - set if you want OTEL)
|
# OpenTelemetry environment variables (optional - set if you want OTEL)
|
||||||
# - OTEL_EXPORTER_OTLP_ENDPOINT=http://your-otel-collector:4317
|
# - OTEL_EXPORTER_OTLP_ENDPOINT=http://your-otel-collector:4317
|
||||||
# - OTEL_SERVICE_NAME=comfyui
|
# - OTEL_SERVICE_NAME=comfyui
|
||||||
|
|||||||
@ -37,9 +37,9 @@ install_node() {
|
|||||||
|
|
||||||
# Clone the repository
|
# Clone the repository
|
||||||
if [ -n "${GIT_LFS_SKIP_SMUDGE}" ]; then
|
if [ -n "${GIT_LFS_SKIP_SMUDGE}" ]; then
|
||||||
GIT_LFS_SKIP_SMUDGE=1 git clone --depth 1 "${repo_url}" "${target_dir}"
|
GIT_TERMINAL_PROMPT=0 GIT_LFS_SKIP_SMUDGE=1 git clone --depth 1 "${repo_url}" "${target_dir}"
|
||||||
else
|
else
|
||||||
git clone --depth 1 "${repo_url}" "${target_dir}"
|
GIT_TERMINAL_PROMPT=0 git clone --depth 1 "${repo_url}" "${target_dir}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo " Successfully installed ${repo_name}"
|
echo " Successfully installed ${repo_name}"
|
||||||
|
|||||||
@ -11,7 +11,7 @@ WORKDIR="${COMFYUI_DIR}"
|
|||||||
cd "${WORKDIR}"
|
cd "${WORKDIR}"
|
||||||
|
|
||||||
# Create virtual environment if it doesn't exist
|
# Create virtual environment if it doesn't exist
|
||||||
if [ ! -d "${VENV_DIR}" ]; then
|
if [ ! -f "${VENV_DIR}/bin/activate" ]; then
|
||||||
echo "Creating virtual environment..."
|
echo "Creating virtual environment..."
|
||||||
python -m venv "${VENV_DIR}"
|
python -m venv "${VENV_DIR}"
|
||||||
fi
|
fi
|
||||||
@ -57,6 +57,13 @@ if [ "${INSTALL_CURATED_NODES:-false}" = "true" ]; then
|
|||||||
https://github.com/giriss/comfy-image-saver || echo "Warning: Some custom nodes failed to install"
|
https://github.com/giriss/comfy-image-saver || echo "Warning: Some custom nodes failed to install"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Optional: Install Nano Banana node (can be enabled via environment variable)
|
||||||
|
if [ "${INSTALL_NANO_BANANA:-false}" = "true" ]; then
|
||||||
|
echo "Installing Nano Banana custom node..."
|
||||||
|
export COMFYUI_DIR="${COMFYUI_DIR}"
|
||||||
|
comfy-node-install https://github.com/jeffy5/ComfyUI-Nano-Banana || echo "Warning: Nano Banana installation failed"
|
||||||
|
fi
|
||||||
|
|
||||||
# Check if OpenTelemetry endpoint is configured
|
# Check if OpenTelemetry endpoint is configured
|
||||||
if [ -n "${OTEL_EXPORTER_OTLP_ENDPOINT}" ]; then
|
if [ -n "${OTEL_EXPORTER_OTLP_ENDPOINT}" ]; then
|
||||||
echo "OpenTelemetry endpoint detected, enabling instrumentation..."
|
echo "OpenTelemetry endpoint detected, enabling instrumentation..."
|
||||||
@ -64,9 +71,9 @@ if [ -n "${OTEL_EXPORTER_OTLP_ENDPOINT}" ]; then
|
|||||||
--traces_exporter otlp \
|
--traces_exporter otlp \
|
||||||
--metrics_exporter otlp \
|
--metrics_exporter otlp \
|
||||||
--logs_exporter otlp \
|
--logs_exporter otlp \
|
||||||
python main.py --listen 0.0.0.0 --port 8188 "$@"
|
python main.py --listen 0.0.0.0 --port 8188 ${COMFYUI_ARGS:-} "$@"
|
||||||
else
|
else
|
||||||
echo "Starting ComfyUI without OpenTelemetry instrumentation..."
|
echo "Starting ComfyUI without OpenTelemetry instrumentation..."
|
||||||
exec python main.py --listen 0.0.0.0 --port 8188 "$@"
|
exec python main.py --listen 0.0.0.0 --port 8188 ${COMFYUI_ARGS:-} "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user