Add isolated ComfyUI image playground with real profile-based generation
This commit is contained in:
+13
-3
@@ -1,8 +1,18 @@
|
||||
FROM nvidia/cuda:12.8.1-devel-ubuntu24.04
|
||||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends python3 git cmake g++ make ca-certificates libssl-dev && rm -rf /var/lib/apt/lists/*
|
||||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends python3 python3-venv git cmake g++ make ca-certificates libssl-dev && rm -rf /var/lib/apt/lists/*
|
||||
# Isolated image runtime. Keep llama.cpp build tools and the app interpreter separate.
|
||||
RUN python3 -m venv /opt/deck-image-python \
|
||||
&& /opt/deck-image-python/bin/pip install --no-cache-dir torch==2.11.0 torchvision==0.26.0 --index-url https://download.pytorch.org/whl/cu128
|
||||
COPY deploy/image-requirements.lock /tmp/image-requirements.lock
|
||||
RUN git clone https://github.com/Comfy-Org/ComfyUI.git /opt/deck-comfy \
|
||||
&& git -C /opt/deck-comfy checkout 8d534945ebd53cff61e8def81757c6a6c1b9cf2d \
|
||||
&& git clone https://github.com/leejet/ComfyUI-GGUF.git /opt/deck-comfy/custom_nodes/ComfyUI-GGUF \
|
||||
&& git -C /opt/deck-comfy/custom_nodes/ComfyUI-GGUF checkout 373048b8403a7820620065210a691263d4da0a61 \
|
||||
&& /opt/deck-image-python/bin/pip install --no-cache-dir -c /tmp/image-requirements.lock -r /opt/deck-comfy/requirements.txt -r /opt/deck-comfy/custom_nodes/ComfyUI-GGUF/requirements.txt \
|
||||
&& /opt/deck-image-python/bin/pip freeze > /opt/deck-comfy/deck-requirements.lock
|
||||
WORKDIR /app
|
||||
COPY profiles.py capacity.py server.py runtime.py catalog.py auth.py collect_hardware.py demo.py /app/
|
||||
COPY profiles-ui.js index.html app.js studio.js runtime-ui.js catalog-ui.js style.css login.html login.js access-ui.js network-ui.js /app/
|
||||
COPY image_test.py profiles.py capacity.py server.py runtime.py catalog.py auth.py collect_hardware.py demo.py /app/
|
||||
COPY image-test-ui.js profiles-ui.js index.html app.js studio.js runtime-ui.js catalog-ui.js style.css login.html login.js access-ui.js network-ui.js /app/
|
||||
COPY network/__init__.py network/client.py network/config.py network/rpc.py /app/network/
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 HOME=/tmp \
|
||||
DECK_BIND_HOST=0.0.0.0 DECK_STATE_DIR=/var/lib/deck \
|
||||
|
||||
@@ -56,3 +56,14 @@ Athena bleiben Host-Pakete und Treiber unverändert; Entwicklung weiterhin isoli
|
||||
|
||||
Erst nach diesen Prüfungen darf die Dokumentation den Installer als für ein
|
||||
frisches Debian vollständig geeignet bezeichnen.
|
||||
|
||||
### Eigene Bild-Testlaufzeit
|
||||
|
||||
Der native Installer muss dieselbe Bildumgebung wie der Docker-Testinstaller
|
||||
bereitstellen: separates Virtualenv `/opt/deck-image-python`, gepinnte ComfyUI-
|
||||
Quelle unter `/opt/deck-comfy` und die gepinnte ComfyUI-GGUF-Erweiterung. Konkrete
|
||||
Commits stehen im Dockerfile; Paketversionen in `image-requirements.lock`.
|
||||
PyTorch 2.11.0 CUDA 12.8 benötigt kompatiblen bestehenden Treiber. Keine
|
||||
Treiberänderung oder automatischer Neustart. Der Deck-Service benötigt ausreichend
|
||||
RAM für CPU-Textencoder; die Testinstallation begrenzt ihn auf 32 GiB und zwei
|
||||
CPU-Kerne. Modelle/Encoder/VAE werden weiterhin separat über die Bibliothek geladen.
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
aiohappyeyeballs==2.7.1
|
||||
aiohttp==3.14.3
|
||||
aiosignal==1.4.0
|
||||
alembic==1.20.0
|
||||
annotated-doc==0.0.5
|
||||
annotated-types==0.8.0
|
||||
anyio==4.15.1
|
||||
attrs==26.1.0
|
||||
av==18.1.0
|
||||
blake3==1.0.9
|
||||
certifi==2026.7.22
|
||||
charset-normalizer==3.5.1
|
||||
click==8.5.0
|
||||
comfy-aimdo==0.5.5
|
||||
comfy-angle==0.1.1
|
||||
comfy-kitchen==0.2.35
|
||||
comfyui-embedded-docs==0.5.12
|
||||
comfyui-workflow-templates-core==0.3.361
|
||||
comfyui-workflow-templates-json==0.1.96
|
||||
comfyui-workflow-templates-media-api==0.3.84
|
||||
comfyui-workflow-templates-media-assets-01==0.1.48
|
||||
comfyui-workflow-templates-media-assets-02==0.1.6
|
||||
comfyui-workflow-templates-media-image==0.3.160
|
||||
comfyui-workflow-templates-media-other==0.3.229
|
||||
comfyui-workflow-templates-media-video==0.3.101
|
||||
comfyui_frontend_package==1.53.6
|
||||
comfyui_workflow_templates==0.11.70
|
||||
cuda-bindings==12.9.7
|
||||
cuda-pathfinder==1.6.0
|
||||
cuda-toolkit==12.8.1
|
||||
einops==0.8.2
|
||||
filelock==3.32.3
|
||||
frozenlist==1.8.0
|
||||
fsspec==2026.7.0
|
||||
gguf==0.19.0
|
||||
h11==0.16.0
|
||||
hf-xet==1.6.0
|
||||
httpcore==1.0.9
|
||||
httpx==0.28.1
|
||||
huggingface_hub==1.33.0
|
||||
idna==3.20
|
||||
Jinja2==3.1.6
|
||||
kornia==0.8.3
|
||||
kornia_rs==0.2.0
|
||||
Mako==1.4.3
|
||||
markdown-it-py==4.2.0
|
||||
MarkupSafe==3.0.3
|
||||
mdurl==0.1.2
|
||||
mpmath==1.3.0
|
||||
multidict==6.9.1
|
||||
networkx==3.6.1
|
||||
numpy==2.5.2
|
||||
nvidia-cublas-cu12==12.8.4.1
|
||||
nvidia-cuda-cupti-cu12==12.8.90
|
||||
nvidia-cuda-nvrtc-cu12==12.8.93
|
||||
nvidia-cuda-runtime-cu12==12.8.90
|
||||
nvidia-cudnn-cu12==9.19.0.56
|
||||
nvidia-cufft-cu12==11.3.3.83
|
||||
nvidia-cufile-cu12==1.13.1.3
|
||||
nvidia-curand-cu12==10.3.9.90
|
||||
nvidia-cusolver-cu12==11.7.3.90
|
||||
nvidia-cusparse-cu12==12.5.8.93
|
||||
nvidia-cusparselt-cu12==0.7.1
|
||||
nvidia-nccl-cu12==2.28.9
|
||||
nvidia-nvjitlink-cu12==12.8.93
|
||||
nvidia-nvshmem-cu12==3.4.5
|
||||
nvidia-nvtx-cu12==12.8.90
|
||||
packaging==26.3
|
||||
pillow==12.3.0
|
||||
propcache==0.5.4
|
||||
protobuf==7.36.2
|
||||
psutil==7.2.2
|
||||
pydantic==2.13.5
|
||||
pydantic-settings==2.15.0
|
||||
pydantic_core==2.46.5
|
||||
Pygments==2.21.0
|
||||
PyOpenGL==3.1.10
|
||||
python-dotenv==1.2.3
|
||||
PyYAML==6.0.3
|
||||
regex==2026.9.10
|
||||
requests==2.34.2
|
||||
rich==15.0.0
|
||||
safetensors==0.8.0
|
||||
scipy==1.18.1
|
||||
sentencepiece==0.2.2
|
||||
setuptools==78.1.0
|
||||
shellingham==1.5.4
|
||||
simpleeval==1.0.8
|
||||
spandrel==0.4.2
|
||||
SQLAlchemy==2.1.1
|
||||
sympy==1.14.0
|
||||
tokenizers==0.23.2
|
||||
torch==2.11.0+cu128
|
||||
torchsde==0.2.6
|
||||
torchvision==0.26.0+cu128
|
||||
tqdm==4.70.1
|
||||
trampoline==0.1.2
|
||||
transformers==5.17.0
|
||||
triton==3.6.0
|
||||
typer==0.27.2
|
||||
typing-inspection==0.4.4
|
||||
typing_extensions==4.16.0
|
||||
urllib3==2.8.0
|
||||
yarl==1.25.1
|
||||
+6
-6
@@ -14,7 +14,7 @@ import urllib.request
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
LABEL = 'de.casaderoll.athena-deck.standalone'
|
||||
FILES = ['profiles.py','profiles-ui.js','capacity.py','runtime.py','runtime-ui.js','catalog.py','catalog-ui.js','server.py','auth.py','collect_hardware.py','demo.py','index.html','app.js','studio.js','style.css','login.html','login.js','access-ui.js','network-ui.js','network/__init__.py','network/client.py','network/config.py','network/rpc.py','deploy/Dockerfile']
|
||||
FILES = ['image_test.py','image-test-ui.js','profiles.py','profiles-ui.js','capacity.py','runtime.py','runtime-ui.js','catalog.py','catalog-ui.js','server.py','auth.py','collect_hardware.py','demo.py','index.html','app.js','studio.js','style.css','login.html','login.js','access-ui.js','network-ui.js','network/__init__.py','network/client.py','network/config.py','network/rpc.py','deploy/Dockerfile','deploy/image-requirements.lock']
|
||||
|
||||
|
||||
def run(*args, check=True, interactive=False):
|
||||
@@ -93,7 +93,7 @@ def launch(config):
|
||||
base=Path(config['base'])
|
||||
args=['docker','run','-d','--name',config['name'],'--label',LABEL+'='+str(base),
|
||||
'--restart','unless-stopped','--read-only','--cap-drop','ALL','--security-opt','no-new-privileges:true',
|
||||
'--pids-limit','128','--memory','8g','--cpus','2', '--tmpfs','/tmp:rw,nosuid,nodev,size=256m',
|
||||
'--pids-limit','256' if config.get('image_runtime') else '128','--memory','32g' if config.get('image_runtime') else '8g','--cpus','2', '--tmpfs','/tmp:rw,nosuid,nodev,size=256m',
|
||||
'-v',str(base/'state')+':/var/lib/deck:rw','-e','DECK_ALLOWED_HOSTS=127.0.0.1:'+str(config['port'])+',localhost:'+str(config['port']),
|
||||
'-p','127.0.0.1:'+str(config['port'])+':8108',
|
||||
'--health-cmd', 'python3 -c "import urllib.request,json; assert json.load(urllib.request.urlopen(\'http://127.0.0.1:8108/api/v1/auth/status\',timeout=3))[\'initialized\']"',
|
||||
@@ -151,8 +151,8 @@ def install(args):
|
||||
free_port(args.port)
|
||||
parent=base.parent
|
||||
while not parent.exists():parent=parent.parent
|
||||
if shutil.disk_usage(parent).free < 2*1024**3:
|
||||
raise RuntimeError('Mindestens 2 GiB freier Speicher für Installation erforderlich.')
|
||||
if shutil.disk_usage(parent).free < 25*1024**3:
|
||||
raise RuntimeError('Mindestens 25 GiB freier Speicher für Installation inklusive Bildlaufzeit erforderlich.')
|
||||
if not sys.stdin.isatty():
|
||||
raise RuntimeError('Interaktives Terminal für Zugangseinrichtung benötigt (über SSH: ssh -t).')
|
||||
image=build()
|
||||
@@ -160,7 +160,7 @@ def install(args):
|
||||
for sub in ('state','models','backups','bootstrap'):
|
||||
(base/sub).mkdir(mode=0o700)
|
||||
os.chown(base/'state',65534,65534)
|
||||
config=dict(owner=LABEL,base=str(base),name=args.name,port=args.port,image=image,previous_image=None,gpu_telemetry=args.gpu_telemetry)
|
||||
config=dict(owner=LABEL,base=str(base),name=args.name,port=args.port,image=image,previous_image=None,gpu_telemetry=args.gpu_telemetry,image_runtime=True)
|
||||
write_manifest(base,config)
|
||||
provision(config)
|
||||
try:
|
||||
@@ -186,7 +186,7 @@ def update(base, rollback=False):
|
||||
backup_name=config['name']+'-previous'
|
||||
if inspect(backup_name):raise RuntimeError('Rückfall-Containername belegt. Keine Änderung ausgeführt.')
|
||||
stamp=str(time.time_ns())
|
||||
shutil.copytree(base/'state',base/'backups'/stamp,ignore=shutil.ignore_patterns('models','runtime','runtime-verification'))
|
||||
shutil.copytree(base/'state',base/'backups'/stamp,ignore=shutil.ignore_patterns('models','runtime','runtime-verification','image-tests','image-verification'))
|
||||
was_running=previous['State']['Running']
|
||||
if was_running:run('docker','stop','--time','15',config['name'])
|
||||
run('docker','rename',config['name'],backup_name)
|
||||
|
||||
Reference in New Issue
Block a user