From 6fe4c11683bf9580fa836224016d9b50a25411f1 Mon Sep 17 00:00:00 2001 From: Adam Ladachowski Date: Sun, 15 Feb 2026 15:58:14 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=AC=20Commit=20message:=20Update=20202?= =?UTF-8?q?6-02-15=2015:58:14,=201=20files,=2062=20lines?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 📁 Files changed: 1 📝 Lines changed: 62 • Dockerfile.rocm --- Dockerfile.rocm | 62 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Dockerfile.rocm diff --git a/Dockerfile.rocm b/Dockerfile.rocm new file mode 100644 index 0000000..767f06d --- /dev/null +++ b/Dockerfile.rocm @@ -0,0 +1,62 @@ +# Tensors + ComfyUI for AMD ROCm (local testing) +# tensors API exposed, ComfyUI internal only +FROM saiden/sd-rocm + +WORKDIR /workspace + +# Install git and curl +RUN apt-get update && apt-get install -y --no-install-recommends git curl && \ + rm -rf /var/lib/apt/lists/* + +# Install ComfyUI +RUN git clone https://github.com/comfyanonymous/ComfyUI.git && \ + cd ComfyUI && \ + pip install --break-system-packages -r requirements.txt + +# Install ComfyUI Manager +RUN cd /workspace/ComfyUI/custom_nodes && \ + git clone https://github.com/ltdrdata/ComfyUI-Manager.git && \ + cd ComfyUI-Manager && \ + pip install --break-system-packages -r requirements.txt + +# Install tensors with server dependencies +COPY . /tmp/tensors +RUN pip install --break-system-packages /tmp/tensors'[server]' && \ + rm -rf /tmp/tensors + +# Configure tensors +RUN mkdir -p /root/.config/tensors && \ + cat > /root/.config/tensors/config.toml << 'EOF' +[paths] +models_dir = "/workspace/ComfyUI/models" +checkpoints = "/workspace/ComfyUI/models/checkpoints" +loras = "/workspace/ComfyUI/models/loras" +vae = "/workspace/ComfyUI/models/vae" +embeddings = "/workspace/ComfyUI/models/embeddings" + +[comfyui] +url = "http://127.0.0.1:8188" +EOF + +# Startup script: ComfyUI internal + tensors API exposed +RUN cat > /workspace/start.sh << 'EOF' +#!/bin/bash +# Start ComfyUI in background (internal only, localhost) +python /workspace/ComfyUI/main.py --listen 127.0.0.1 --port 8188 & + +# Wait for ComfyUI to be ready +echo "Waiting for ComfyUI..." +until curl -s http://127.0.0.1:8188/system_stats > /dev/null 2>&1; do + sleep 1 +done +echo "ComfyUI ready" + +# Start tensors API (exposed) +exec tsr serve --host 0.0.0.0 --port 8080 +EOF +RUN chmod +x /workspace/start.sh + +# Only expose tensors API +EXPOSE 8080 + +CMD ["/workspace/start.sh"]