From dbdcae93e6e2eab7b3fb519afdef2609e48bdf8e Mon Sep 17 00:00:00 2001 From: Nacim Date: Mon, 23 Jun 2025 11:40:38 +0200 Subject: [PATCH] Update Dockerfile.analyzer --- Dockerfile.analyzer | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/Dockerfile.analyzer b/Dockerfile.analyzer index 9144160..4fa3084 100644 --- a/Dockerfile.analyzer +++ b/Dockerfile.analyzer @@ -2,27 +2,5 @@ FROM mcr.microsoft.com/presidio-analyzer:latest USER root -# Installer les dépendances système -RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* -# Installer le modèle spaCy français -RUN pip install --no-cache-dir \ - https://github.com/explosion/spacy-models/releases/download/fr_core_news_sm-3.7.0/fr_core_news_sm-3.7.0-py3-none-any.whl - -# Copier et installer requirements.txt (qui contient maintenant gunicorn, pyyaml etc.) -COPY requirements.txt /tmp/requirements.txt -RUN pip install --no-cache-dir -r /tmp/requirements.txt - -# Copier votre fichier default.yaml dans le répertoire de configuration de Presidio. -# L'application Presidio s'attend à le trouver dans `presidio_analyzer/conf/` -COPY default.yaml /usr/local/lib/python3.9/site-packages/presidio_analyzer/conf/default.yaml - -# Copier le dossier de vos recognizers Python (si vous avez choisi cette approche) -# Ils doivent être accessibles via le PYTHONPATH. -COPY custom_recognizers /usr/local/lib/python3.9/site-packages/custom_recognizers - - -# **** NOUVELLE CMD : Utiliser 'python -m' pour lancer l'application Flask de Presidio **** -# Ceci est la méthode la plus fiable pour lancer une application Python installée via pip. -# Gunicorn est déjà installé par requirements.txt, donc nous l'utilisons pour servir l'application Flask. -CMD ["gunicorn", "-w", "1", "-b", "0.0.0.0:3000", "presidio_analyzer.app:app"] +CMD ["bash"]