refactor: fully embed ComfyUI into BoosAPI, drop external dependency
- Remove comfyui.ts (external proxy to ComfyUI at :8188) - Remove videoAgent.ts (redundant with comfyuiAgent) - Remove ComfyUI Python process from Dockerfile (CPU-only, useless) - Update boosapi_comfy_nodes.py default to localhost BoosAPI - Clean up index.ts, App.tsx, desktop.ts registrations - Sidebar: merge '视频工作台'/'视频助手' into single '视频助手' entry Signed-off-by: boos <boos@boos.lat>
This commit is contained in:
+3
-26
@@ -23,17 +23,15 @@ ARG NO_PROXY
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV NODE_ENV=production
|
||||
ENV COMFYUI_BASE=http://127.0.0.1:8188
|
||||
ENV HTTP_PROXY=${HTTP_PROXY}
|
||||
ENV HTTPS_PROXY=${HTTPS_PROXY}
|
||||
ENV ALL_PROXY=${ALL_PROXY}
|
||||
ENV NO_PROXY=${NO_PROXY}
|
||||
|
||||
# Install system deps: Node.js 22, Python 3, supervisor
|
||||
# Install system deps: Node.js 22, supervisor
|
||||
RUN echo 'Acquire::http::Proxy "false";' > /etc/apt/apt.conf.d/99no-proxy && apt-get update && apt-get install -y --no-install-recommends \
|
||||
curl ca-certificates gnupg \
|
||||
python3 python3-pip python3-venv \
|
||||
supervisor git \
|
||||
supervisor \
|
||||
&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
|
||||
&& apt-get install -y --no-install-recommends nodejs \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
@@ -42,17 +40,6 @@ RUN echo 'Acquire::http::Proxy "false";' > /etc/apt/apt.conf.d/99no-proxy && apt
|
||||
COPY rtk /usr/local/bin/rtk
|
||||
RUN chmod +x /usr/local/bin/rtk
|
||||
|
||||
# Set up ComfyUI with CPU PyTorch
|
||||
WORKDIR /app/comfy
|
||||
RUN git clone https://github.com/comfyanonymous/ComfyUI.git . \
|
||||
&& python3 -m venv venv \
|
||||
&& . venv/bin/activate \
|
||||
&& pip install --upgrade pip \
|
||||
&& pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu \
|
||||
&& grep -v kornia_rs requirements.txt | pip install -r /dev/stdin \
|
||||
&& rm -rf ~/.cache/pip
|
||||
ENV PATH="/app/comfy/venv/bin:${PATH}"
|
||||
|
||||
# Copy metapi (built)
|
||||
WORKDIR /app/metapi
|
||||
COPY --from=metapi-builder /app/dist ./dist
|
||||
@@ -61,9 +48,6 @@ COPY --from=metapi-builder /app/package.json ./
|
||||
COPY --from=metapi-builder /app/drizzle ./drizzle
|
||||
RUN mkdir -p data
|
||||
|
||||
# Copy BoosAPI custom nodes for ComfyUI
|
||||
COPY --from=metapi-builder /app/boosapi_comfy_nodes.py /app/comfy/custom_nodes/boosapi_comfy_nodes.py
|
||||
|
||||
# Supervisor config
|
||||
RUN mkdir -p /var/log/supervisor
|
||||
COPY <<'SUPERVISOR' /etc/supervisor/conf.d/all.conf
|
||||
@@ -80,15 +64,8 @@ autorestart=true
|
||||
stdout_logfile=/var/log/supervisor/metapi.log
|
||||
stderr_logfile=/var/log/supervisor/metapi.err
|
||||
|
||||
[program:comfyui]
|
||||
command=python3 main.py --listen 0.0.0.0 --port 8188 --cpu
|
||||
directory=/app/comfy
|
||||
autorestart=true
|
||||
startretries=3
|
||||
stdout_logfile=/var/log/supervisor/comfyui.log
|
||||
stderr_logfile=/var/log/supervisor/comfyui.err
|
||||
SUPERVISOR
|
||||
|
||||
EXPOSE 4000 8188
|
||||
EXPOSE 4000
|
||||
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/all.conf"]
|
||||
|
||||
Reference in New Issue
Block a user