> For the complete documentation index, see [llms.txt](https://docs.clore.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clore.ai/guides/guides_v2-fr/prise-en-main/docker-images.md).

# Images Docker

Images Docker prêtes à être déployées pour les charges de travail IA sur CLORE.AI.

{% hint style="success" %}
Déployez ces images directement sur [CLORE.AI Marketplace](https://clore.ai/marketplace).
{% endhint %}

## Référence de déploiement rapide

### Les plus populaires

| Tâche                                   | Image                                | Ports     |
| --------------------------------------- | ------------------------------------ | --------- |
| Discuter avec l'IA                      | `ollama/ollama`                      | 22, 11434 |
| Interface de type ChatGPT               | `ghcr.io/open-webui/open-webui`      | 22, 8080  |
| Génération d'images                     | `universonic/stable-diffusion-webui` | 22, 7860  |
| Génération d'images basée sur des nœuds | `yanwk/comfyui-boot`                 | 22, 8188  |
| Serveur API LLM                         | `vllm/vllm-openai`                   | 22, 8000  |

***

## Modèles de langage

### composant Ollama

**Exécuteur LLM universel - la façon la plus simple d'exécuter n'importe quel modèle.**

```
Image : ollama/ollama
Ports : 22/tcp, 11434/http
Commande : ollama serve
```

**Après le déploiement :**

```bash
# Se connecter en SSH au serveur
ssh -p <port> root@<proxy>

# Récupérer et exécuter un modèle
ollama pull llama3.2
ollama run llama3.2
```

**Variables d'environnement :**

```
OLLAMA_HOST=0.0.0.0
OLLAMA_MODELS=/root/.ollama/models
```

***

### Ouvrir WebUI

**Interface de type ChatGPT pour Ollama.**

```
Image : ghcr.io/open-webui/open-webui:ollama
Ports : 22/tcp, 8080/http
```

Inclut Ollama intégré. Accès via le port HTTP.

**Autonome (se connecter à un Ollama existant) :**

```
Image : ghcr.io/open-webui/open-webui:main
Ports : 22/tcp, 8080/http
Environnement : OLLAMA_BASE_URL=http://localhost:11434
```

***

### vLLM

**Service LLM haute performance avec API compatible OpenAI.**

```
Image : vllm/vllm-openai:latest
Ports : 22/tcp, 8000/http
Commande : python -m vllm.entrypoints.openai.api_server --model meta-llama/Meta-Llama-3.1-8B-Instruct --host 0.0.0.0
```

**Pour les modèles plus grands (multi-GPU) :**

```bash
python -m vllm.entrypoints.openai.api_server \
    --model meta-llama/Meta-Llama-3.1-70B-Instruct \
    --tensor-parallel-size 2 \
    --host 0.0.0.0
```

**Variables d'environnement :**

```
HUGGING_FACE_HUB_TOKEN=<votre-token>  # Pour les modèles restreints
```

***

### Text Generation Inference (TGI)

**Serveur LLM de production de HuggingFace.**

```
Image : ghcr.io/huggingface/text-generation-inference:latest
Ports : 22/tcp, 8080/http
Commande : --model-id meta-llama/Meta-Llama-3.1-8B-Instruct
```

**Variables d'environnement :**

```
HUGGING_FACE_HUB_TOKEN=<votre-token>
MAX_INPUT_LENGTH=4096
MAX_TOTAL_TOKENS=8192
```

***

## Génération d'images

### Stable Diffusion WebUI (AUTOMATIC1111)

**Interface SD la plus populaire avec extensions.**

```
Image : universonic/stable-diffusion-webui:latest
Ports : 22/tcp, 7860/http
```

**Pour faible VRAM (8 Go ou moins) :**

```bash
./webui.sh --listen --medvram --xformers
```

**Pour l'accès API :**

```bash
./webui.sh --listen --xformers --api
```

***

### ComfyUI

**Flux de travail basé sur des nœuds pour utilisateurs avancés.**

```
Image : yanwk/comfyui-boot:cu126-slim
Ports : 22/tcp, 8188/http
Environnement : CLI_ARGS=--listen 0.0.0.0
```

**Images alternatives :**

```
# Avec extensions courantes
Image : ai-dock/comfyui:latest

# Minimal
Image : pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel
```

**Commande d'installation manuelle :**

```bash
git clone https://github.com/comfyanonymous/ComfyUI && cd ComfyUI && pip install -r requirements.txt && python main.py --listen 0.0.0.0
```

***

### Fooocus

**Interface SD simplifiée, type Midjourney.**

```
Image : pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel
Ports : 22/tcp, 7865/http
Commande : git clone https://github.com/lllyasviel/Fooocus && cd Fooocus && pip install -r requirements.txt && python launch.py --listen
```

***

### FLUX

**Génération d'images haute qualité et récente.**

Utiliser ComfyUI avec les nœuds FLUX :

```
Image : yanwk/comfyui-boot:cu126-slim
Ports : 22/tcp, 8188/http
```

Ou via Diffusers :

```
Image : pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel
Ports : 22/tcp
```

```python
# Après SSH
pip install diffusers transformers accelerate
python << 'EOF'
from diffusers import FluxPipeline
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell")
pipe.enable_model_cpu_offload()
image = pipe("A cat", num_inference_steps=4).images[0]
image.save("output.png")
EOF
```

***

## Génération vidéo

### Stable Video Diffusion

```
Image : pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel
Ports : 22/tcp
```

```bash
pip install diffusers transformers accelerate
python << 'EOF'
from diffusers import StableVideoDiffusionPipeline
from diffusers.utils import load_image, export_to_video
pipe = StableVideoDiffusionPipeline.from_pretrained(
    "stabilityai/stable-video-diffusion-img2vid-xt",
    variant="fp16"
)
pipe.to("cuda")
image = load_image("input.png")
frames = pipe(image, num_frames=25).frames[0]
export_to_video(frames, "output.mp4", fps=7)
EOF
```

***

### AnimateDiff

Utiliser avec ComfyUI :

```
Image : yanwk/comfyui-boot:cu126-slim
Ports : 22/tcp, 8188/http
```

Installez les nœuds AnimateDiff via le gestionnaire ComfyUI.

***

## Audio et voix

### Whisper (Transcription)

```
Image : onerahmet/openai-whisper-asr-webservice:latest
Ports : 22/tcp, 9000/http
Environnement : ASR_MODEL=large-v3
```

**Utilisation de l'API :**

```bash
curl -X POST "http://localhost:9000/asr" \
    -F "audio_file=@audio.mp3" \
    -F "task=transcribe"
```

***

### Bark (Synthèse vocale)

```
Image : pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel
Ports : 22/tcp
```

```bash
pip install bark
python << 'EOF'
from bark import SAMPLE_RATE, generate_audio, preload_models
from scipy.io.wavfile import write as write_wav
preload_models()
audio = generate_audio("Hello, this is a test.")
write_wav("output.wav", SAMPLE_RATE, audio)
EOF
```

***

### Stable Audio

```
Image : pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel
Ports : 22/tcp
```

```bash
pip install stable-audio-tools
# Requiert un token HF pour l'accès au modèle
```

***

## Modèles de vision

### LLaVA

```
Image : pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel
Ports : 22/tcp
```

```bash
pip install llava
python -m llava.serve.cli --model-path liuhaotian/llava-v1.6-34b
```

***

### Llama 3.2 Vision

Utiliser Ollama :

```
Image : ollama/ollama
Ports : 22/tcp, 11434/http
```

```bash
ollama pull llama3.2-vision
ollama run llama3.2-vision "describe this image" --images photo.jpg
```

***

## Développement & Entraînement

### Base PyTorch

**Pour configurations personnalisées et entraînement.**

```
Image : pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel
Ports : 22/tcp
```

Inclut : CUDA 12.1, cuDNN 8, PyTorch 2.1

***

### Jupyter Lab

**Notebooks interactifs pour ML.**

```
Image : jupyter/pytorch-notebook:cuda12-pytorch-2.1
Ports : 22/tcp, 8888/http
```

Ou utilisez la base PyTorch avec Jupyter :

```bash
pip install jupyterlab
jupyter lab --ip=0.0.0.0 --allow-root --no-browser
```

***

### Entraînement Kohya

**Pour LoRA et l'affinage de modèles.**

```
Image : pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel
Ports : 22/tcp
```

```bash
git clone https://github.com/kohya-ss/sd-scripts
cd sd-scripts
pip install -r requirements.txt
# Utiliser les scripts d'entraînement
```

***

## Référence des images de base

### Officiel NVIDIA

| Image                                    | CUDA | Cas d'utilisation       |
| ---------------------------------------- | ---- | ----------------------- |
| `nvidia/cuda:12.1.0-devel-ubuntu22.04`   | 12.1 | Développement CUDA      |
| `nvidia/cuda:12.1.0-runtime-ubuntu22.04` | 12.1 | Runtime CUDA uniquement |
| `nvidia/cuda:11.8.0-devel-ubuntu22.04`   | 11.8 | Compatibilité héritée   |

### Officiel PyTorch

| Image                                          | PyTorch | CUDA |
| ---------------------------------------------- | ------- | ---- |
| `pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel`  | 2.5     | 12.4 |
| `pytorch/pytorch:2.0.1-cuda11.7-cudnn8-devel`  | 2.0     | 11.7 |
| `pytorch/pytorch:1.13.1-cuda11.6-cudnn8-devel` | 1.13    | 11.6 |

### HuggingFace

| Image                                           | But                    |
| ----------------------------------------------- | ---------------------- |
| `huggingface/transformers-pytorch-gpu`          | Transformers + PyTorch |
| `ghcr.io/huggingface/text-generation-inference` | Serveur TGI            |

***

## Variables d'environnement

### Variables courantes

| Variable                 | Description                              | Exemple        |
| ------------------------ | ---------------------------------------- | -------------- |
| `HUGGING_FACE_HUB_TOKEN` | Token API HF pour les modèles restreints | `hf_xxx`       |
| `CUDA_VISIBLE_DEVICES`   | Sélection du GPU                         | `0,1`          |
| `TRANSFORMERS_CACHE`     | Répertoire du cache de modèles           | `/root/.cache` |

### Variables Ollama

| Variable              | Description            | Par défaut         |
| --------------------- | ---------------------- | ------------------ |
| `OLLAMA_HOST`         | Adresse de liaison     | `127.0.0.1`        |
| `OLLAMA_MODELS`       | Répertoire des modèles | `~/.ollama/models` |
| `OLLAMA_NUM_PARALLEL` | Requêtes parallèles    | `1`                |

### Variables vLLM

| Variable                 | Description                       |
| ------------------------ | --------------------------------- |
| `VLLM_ATTENTION_BACKEND` | Implémentation de l'attention     |
| `VLLM_USE_MODELSCOPE`    | Utiliser ModelScope au lieu de HF |

***

## Référence des ports

| Port  | Protocole | Service                    |
| ----- | --------- | -------------------------- |
| 22    | TCP       | SSH                        |
| 7860  | HTTP      | Gradio (SD WebUI, Fooocus) |
| 7865  | HTTP      | Alternative Fooocus        |
| 8000  | HTTP      | API vLLM                   |
| 8080  | HTTP      | Open WebUI, TGI            |
| 8188  | HTTP      | ComfyUI                    |
| 8888  | HTTP      | Jupyter                    |
| 9000  | HTTP      | API Whisper                |
| 11434 | TCP       | API Ollama                 |

***

## Conseils

### Stockage persistant

Montez des volumes pour conserver les données entre les redémarrages :

```bash
docker run -v /data/models:/root/.cache/huggingface ...
```

### Sélection du GPU

Pour systèmes multi-GPU :

```bash
docker run --gpus '"device=0,1"' ...
# ou
CUDA_VISIBLE_DEVICES=0,1
```

### Gestion de la mémoire

Si manque de VRAM :

1. Utilisez des modèles plus petits
2. Activer le déchargement vers le CPU
3. Réduire la taille de batch
4. Utilisez des modèles quantifiés (GGUF Q4)

## Prochaines étapes

* [Comparaison GPU](/guides/guides_v2-fr/prise-en-main/gpu-comparison.md) - Choisir le bon GPU
* [Compatibilité des modèles](/guides/guides_v2-fr/prise-en-main/model-compatibility.md) - Ce qui fonctionne où
* [Guide de démarrage rapide](/guides/guides_v2-fr/quickstart.md) - Commencer en 5 minutes


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.clore.ai/guides/guides_v2-fr/prise-en-main/docker-images.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
