From 333ca59363ec1c4bf08901b6c3f4d6b1a85478a2 Mon Sep 17 00:00:00 2001 From: nicoboy Date: Mon, 23 Feb 2026 16:57:13 +0000 Subject: [PATCH] Actualiser dockerfile.txt --- dockerfile.txt | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/dockerfile.txt b/dockerfile.txt index ad64475..1aec25d 100644 --- a/dockerfile.txt +++ b/dockerfile.txt @@ -1,23 +1,17 @@ FROM nvcr.io/nvidia/pytorch:26.01-py3 ENV DEBIAN_FRONTEND=noninteractive -# 1. Système : Dépendances Ubuntu Noble (libgl1 et zstd inclus) +# 1. Système RUN apt-get update && apt-get install -y \ openssh-server ffmpeg libsndfile1 sox git curl zstd \ - libgl1 libglib2.0-0 \ + libgl1 libglib2.0-0 net-tools \ && apt-get clean && rm -rf /var/lib/apt/lists/* -# Config SSH pour root (Vast.ai) -RUN mkdir /var/run/sshd && \ - echo 'root:root' | chpasswd && \ - sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config - # 2. Python & Dépendances RUN pip install --no-cache-dir numpy==1.26.4 RUN pip install --no-cache-dir \ open-webui gradio scipy soundfile julius omegaconf hydra-core \ flashy torchmetrics encodec xformers einops spacy==3.7.6 - RUN pip install --no-cache-dir --no-deps git+https://github.com/facebookresearch/audiocraft.git # 3. Ollama & Comfy @@ -26,20 +20,15 @@ WORKDIR /root RUN git clone https://github.com/comfyanonymous/ComfyUI.git && \ cd ComfyUI && pip install --no-cache-dir -r requirements.txt -# 4. Copie du code applicatif +# 4. Code applicatif RUN mkdir -p /root/audiocraft-api COPY server.py /root/audiocraft-api/server.py -# 5. Script de démarrage : Correction critique de la syntaxe d'écriture -# Utilisation de printf avec doubles backslashes pour garantir les retours à la ligne réels -RUN printf "#!/bin/bash\n\ -service ssh start\n\ -ollama serve > /root/ollama.log 2>&1 & \n\ -open-webui serve --port 3000 > /root/webui.log 2>&1 & \n\ -python3 /root/ComfyUI/main.py --listen 0.0.0.0 --port 8188 > /root/comfy.log 2>&1 & \n\ -python3 /root/audiocraft-api/server.py > /root/audio.log 2>&1 & \n\ -echo 'Studio Ready' \n\ -sleep infinity" > /start.sh && chmod +x /start.sh - +# 5. La solution 1-Click : Tout lancer d'un coup sans script externe foireux EXPOSE 22 3000 7860 8188 11434 -ENTRYPOINT ["/bin/bash", "/start.sh"] \ No newline at end of file + +CMD ollama serve > /root/ollama.log 2>&1 & \ + open-webui serve --port 3000 > /root/webui.log 2>&1 & \ + python3 /root/ComfyUI/main.py --listen 0.0.0.0 --port 8188 > /root/comfy.log 2>&1 & \ + python3 /root/audiocraft-api/server.py > /root/audio.log 2>&1 & \ + sleep infinity \ No newline at end of file