💬 Commit message: Update 2026-02-15 09:11:32, 1 files, 60 lines
📁 Files changed: 1 📝 Lines changed: 60 • Dockerfile
This commit is contained in:
+25
-23
@@ -1,29 +1,31 @@
|
|||||||
# Build stage
|
# Tensors + ComfyUI for RTX 5090 / CUDA 12.8
|
||||||
FROM saiden/tengu:python-3.12-dev AS builder
|
FROM madiator2011/better-comfyui:slim-5090
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /workspace
|
||||||
|
|
||||||
# Copy everything needed for the package
|
# ComfyUI is pre-installed in base image at /workspace/ComfyUI
|
||||||
COPY . .
|
# Install ComfyUI Manager
|
||||||
|
RUN cd /workspace/ComfyUI/custom_nodes && \
|
||||||
|
git clone https://github.com/ltdrdata/ComfyUI-Manager.git && \
|
||||||
|
cd ComfyUI-Manager && \
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
# Install dependencies and package
|
# Install tensors with server dependencies
|
||||||
RUN uv pip install --system -e '.[server]'
|
COPY . /tmp/tensors
|
||||||
|
RUN pip install /tmp/tensors'[server]' && \
|
||||||
|
rm -rf /tmp/tensors
|
||||||
|
|
||||||
# Runtime stage
|
# Configure tensors for ComfyUI paths
|
||||||
FROM saiden/tengu:python-3.12
|
RUN mkdir -p /root/.config/tensors && \
|
||||||
|
echo '[paths]' > /root/.config/tensors/config.toml && \
|
||||||
|
echo 'models_dir = "/workspace/ComfyUI/models"' >> /root/.config/tensors/config.toml && \
|
||||||
|
echo 'checkpoints = "/workspace/ComfyUI/models/checkpoints"' >> /root/.config/tensors/config.toml && \
|
||||||
|
echo 'loras = "/workspace/ComfyUI/models/loras"' >> /root/.config/tensors/config.toml && \
|
||||||
|
echo 'vae = "/workspace/ComfyUI/models/vae"' >> /root/.config/tensors/config.toml && \
|
||||||
|
echo 'embeddings = "/workspace/ComfyUI/models/embeddings"' >> /root/.config/tensors/config.toml
|
||||||
|
|
||||||
WORKDIR /app
|
# Expose ports: ComfyUI (8188), tensors API (8080)
|
||||||
|
EXPOSE 8188 8080
|
||||||
|
|
||||||
# Copy installed packages from builder
|
# Default: start ComfyUI (override with docker run command for tensors serve)
|
||||||
COPY --from=builder /usr/local/lib/python3.12 /usr/local/lib/python3.12
|
CMD ["python", "/workspace/ComfyUI/main.py", "--listen", "0.0.0.0", "--port", "8188"]
|
||||||
COPY --from=builder /usr/local/bin /usr/local/bin
|
|
||||||
|
|
||||||
# Copy app source
|
|
||||||
COPY --from=builder /app /app
|
|
||||||
|
|
||||||
# Set environment
|
|
||||||
ENV PATH="/usr/local/bin:$PATH"
|
|
||||||
|
|
||||||
EXPOSE 5000
|
|
||||||
|
|
||||||
CMD ["tsr", "serve", "--host", "0.0.0.0", "--port", "5000", "--sd-server", "http://172.17.0.1:1234"]
|
|
||||||
|
|||||||
Reference in New Issue
Block a user