Repository navigation
Feat/sos custom #15493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Feat/sos custom #15493
Changes from all commits
a623eb9
08584c3
d2432e4
85ba15a
f54b3b0
86dacfc
bf1c237
b966631
7858973
96b4a58
526c4ad
42f1034
68dbdc2
6ea3620
dd57f77
ca92ccc
1d21606
a8f597b
a0b8e8e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| .git | ||
| .gitignore | ||
|
|
||
| # Runtime data is bind-mounted by docker-compose. | ||
| models | ||
| input | ||
| output | ||
| user | ||
|
|
||
| # Local Python/cache artifacts | ||
| __pycache__ | ||
| *.py[cod] | ||
| .pytest_cache | ||
| .mypy_cache | ||
| .ruff_cache | ||
| .venv | ||
| venv | ||
| env | ||
|
|
||
| # Logs and temporary files | ||
| *.log | ||
| logs | ||
| tmp | ||
| temp | ||
|
|
||
| # Node/frontend caches if present | ||
| node_modules | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| FROM python:3.12-slim | ||
|
|
||
| ENV PYTHONUNBUFFERED=1 \ | ||
| PIP_NO_CACHE_DIR=1 \ | ||
| NVIDIA_VISIBLE_DEVICES=all \ | ||
| NVIDIA_DRIVER_CAPABILITIES=compute,utility | ||
|
|
||
| RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
| build-essential \ | ||
| cmake \ | ||
| ffmpeg \ | ||
| git \ | ||
| libgl1 \ | ||
| libglib2.0-0 \ | ||
| libgomp1 \ | ||
| libsm6 \ | ||
| libxext6 \ | ||
| libxrender1 \ | ||
| python3-dev \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| WORKDIR /app | ||
| ARG TORCH_INDEX_URL=https://download.pytorch.org/whl/cu128 | ||
| RUN pip install --no-cache-dir --timeout 120 --retries 10 torch torchvision torchaudio --index-url ${TORCH_INDEX_URL} | ||
|
|
||
| COPY requirements.txt ./ | ||
| RUN grep -vE '^(torch|torchvision|torchaudio)($|[<>=~ ])' requirements.txt > /tmp/requirements-no-torch.txt \ | ||
| && pip install --no-cache-dir --timeout 120 --retries 10 -r /tmp/requirements-no-torch.txt | ||
|
|
||
| COPY manager_requirements.txt ./ | ||
| RUN pip install --no-cache-dir --timeout 120 --retries 10 -r manager_requirements.txt | ||
|
|
||
| COPY . . | ||
| RUN find custom_nodes -mindepth 2 -maxdepth 2 -name requirements.txt -print -exec sh -c \ | ||
| 'grep -vE "^(torch|torchvision|torchaudio|onnxruntime-gpu)($|[<>=~ ])" "$1" > /tmp/custom-node-requirements.txt && if [ -s /tmp/custom-node-requirements.txt ]; then pip install --no-cache-dir --timeout 120 --retries 10 -r /tmp/custom-node-requirements.txt; fi' sh {} \; | ||
|
|
||
| EXPOSE 8188 | ||
| CMD ["python", "main.py", "--listen", "0.0.0.0", "--port", "8188", "--enable-manager-legacy-ui", "--disable-cuda-malloc", "--reserve-vram", "1.5"] | ||
|
Comment on lines
+22
to
+38
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win Run the final container process as a non-root user. Both images run
🧰 Tools🪛 Checkov (3.3.9)[low] 1-38: Ensure that HEALTHCHECK instructions have been added to container images (CKV_DOCKER_2) [low] 1-38: Ensure that a user for the container has been created (CKV_DOCKER_3) 🪛 Hadolint (2.15.1)[warning] 24-24: Pin versions in pip. Instead of (DL3013) 📍 Affects 2 files
🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| FROM comfyui-sos-comfyui:vision-fixed | ||
|
|
||
| # 固定 RTX 5060 / PyTorch 2.11 cu128 的本地编译产物,不升级运行栈。 | ||
| COPY sageattention-2.2.0-cp312-cp312-linux_x86_64.whl /opt/h3-wheels/ | ||
| RUN echo '93ecec1aeee32f4f58f7d9b908f8b442b8dea678f9f5ab935ae3bc288d0658bb /opt/h3-wheels/sageattention-2.2.0-cp312-cp312-linux_x86_64.whl' | sha256sum --check - \ | ||
| && python -m pip install --no-cache-dir --no-deps /opt/h3-wheels/sageattention-2.2.0-cp312-cp312-linux_x86_64.whl \ | ||
| && python -c "import importlib.metadata as m; assert m.version('torch') == '2.11.0+cu128'; assert m.version('sageattention') == '2.2.0'" | ||
|
|
||
| LABEL com.suzumiya.h3.sageattention.commit="d1a57a546c3d395b1ffcbeecc66d81db76f3b4b5" | ||
|
|
||
| # 既有 Fill 节点包的实际导入依赖;不运行其全量云端 SDK 安装。 | ||
| COPY soundfile-0.14.0-py2.py3-none-manylinux_2_28_x86_64.whl /opt/h3-wheels/ | ||
| RUN echo '1e38bac1853412871318e82a1ba69a8be677619b56025bbfcccdb41b6cafe82d /opt/h3-wheels/soundfile-0.14.0-py2.py3-none-manylinux_2_28_x86_64.whl' | sha256sum --check - \ | ||
| && python -m pip install --no-cache-dir --no-deps /opt/h3-wheels/soundfile-0.14.0-py2.py3-none-manylinux_2_28_x86_64.whl \ | ||
| && python -c "import soundfile; import importlib.metadata as m; assert m.version('torch') == '2.11.0+cu128'; assert m.version('soundfile') == '0.14.0'" | ||
|
|
||
| COPY h3_local_requirements.txt /opt/h3-wheels/ | ||
| RUN python -m pip install --no-cache-dir --no-deps --only-binary=:all: --require-hashes --index-url https://pypi.org/simple -r /opt/h3-wheels/h3_local_requirements.txt \ | ||
| && python -c "import importlib.metadata as m; assert m.version('torch') == '2.11.0+cu128'" | ||
|
|
||
| # 恢复原作旧分支节点,不执行会下载权重的 Impact 安装脚本。 | ||
| COPY h3_legacy_requirements.txt /opt/h3-wheels/ | ||
| RUN python -m pip install --no-cache-dir --no-deps --only-binary=:all: --require-hashes --index-url https://pypi.org/simple -r /opt/h3-wheels/h3_legacy_requirements.txt \ | ||
| && python -c "import piexif, dill; import importlib.metadata as m; assert m.version('torch') == '2.11.0+cu128'; assert m.version('piexif') == '1.1.3'; assert m.version('dill') == '0.4.1'" | ||
|
|
||
| # 只回移植官方旁路 LoRA 修复,保留0.33接口和既有量化内核。 | ||
| COPY h3_fused_bypass.patch /opt/h3-wheels/ | ||
| RUN echo '28a44d8c49d37534c5fb3af0855ad689c4261f5a90295034d397d84a0835f90d /app/comfy/ops.py' | sha256sum --check - \ | ||
| && echo '618c286c5f74e823318f41774e02cfcfa02d74ee9d51320ec0aa2694cd74aa8e /app/comfy/weight_adapter/bypass.py' | sha256sum --check - \ | ||
| && git -C /app apply --check /opt/h3-wheels/h3_fused_bypass.patch \ | ||
| && git -C /app apply /opt/h3-wheels/h3_fused_bypass.patch \ | ||
| && python -m py_compile /app/comfy/ops.py /app/comfy/weight_adapter/bypass.py \ | ||
| && python -c "import importlib.metadata as m; assert m.version('torch') == '2.11.0+cu128'" | ||
|
|
||
| LABEL com.suzumiya.h3.bypass.upstream="d91ed5f5b7fa60fa18464c2ad7c80254da2f0f29" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| FROM comfyui-sos-comfyui:latest | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift Make the Compose build self-contained.
🧰 Tools🪛 Checkov (3.3.9)[low] 1-1: Ensure the base image uses a non latest version tag (CKV_DOCKER_7) [low] 1-13: Ensure that HEALTHCHECK instructions have been added to container images (CKV_DOCKER_2) [low] 1-13: Ensure that a user for the container has been created (CKV_DOCKER_3) 🪛 Hadolint (2.15.1)[warning] 1-1: Using latest is prone to errors if the image will ever update. Pin the version explicitly to a release tag (DL3007) 🪛 Trivy (0.72.0)[warning] 1-1: ':latest' tag used Specify a tag in the 'FROM' statement for image 'comfyui-sos-comfyui' Rule: DS-0001 (IaC/Dockerfile) [error] 1-1: Image user should not be 'root' Specify at least 1 USER command in Dockerfile with non-root user as argument Rule: DS-0002 (IaC/Dockerfile) [info] 1-1: No HEALTHCHECK defined Add HEALTHCHECK instruction in your Dockerfile Rule: DS-0026 (IaC/Dockerfile) 📍 Affects 2 files
🤖 Prompt for AI Agents |
||
|
|
||
| WORKDIR /app | ||
| COPY manager_requirements.txt seedvr2_requirements.txt ./ | ||
| COPY custom_nodes/ComfyUI-See-through/requirements.txt /tmp/seethrough-requirements.txt | ||
| COPY custom_nodes/ComfyUI-anima-pose-control/requirements.txt /tmp/anima-pose-control-requirements.txt | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| RUN pip install --no-cache-dir --timeout 120 --retries 10 -r manager_requirements.txt \ | ||
| && pip install --no-cache-dir --timeout 120 --retries 10 "transformers==4.50.3" \ | ||
| && pip install --no-cache-dir --timeout 120 --retries 10 -r seedvr2_requirements.txt \ | ||
| && pip install --no-cache-dir --timeout 120 --retries 10 -r /tmp/seethrough-requirements.txt \ | ||
| && pip install --no-cache-dir --timeout 120 --retries 10 -r /tmp/anima-pose-control-requirements.txt | ||
|
|
||
| COPY manager_resolver_constraints.txt /app/manager_requirements.txt | ||
|
|
||
| CMD ["python", "main.py", "--listen", "0.0.0.0", "--port", "8188", "--enable-manager-legacy-ui", "--disable-cuda-malloc", "--reserve-vram", "1.5"] | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 Performance & Scalability | 🟡 Minor | ⚡ Quick win
Exclude
custom_nodesfrom the Docker build context.ASSETS.mdstates that Docker Compose bind-mountscustom_nodes/, but this list excludes onlymodels,input,output, anduser. Addcustom_nodesto prevent unnecessary context transfer and accidental inclusion by broad image copies.Proposed fix
# Runtime data is bind-mounted by docker-compose. models +custom_nodes input output user📝 Committable suggestion
🤖 Prompt for AI Agents