From 18197fa137b28737775fd9f8a2171e8d0ee9db84 Mon Sep 17 00:00:00 2001 From: Nacim Date: Mon, 16 Jun 2025 03:07:15 +0200 Subject: [PATCH] Update Dockerfile.analyzer --- Dockerfile.analyzer | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Dockerfile.analyzer b/Dockerfile.analyzer index 26cf383..2287fa2 100644 --- a/Dockerfile.analyzer +++ b/Dockerfile.analyzer @@ -1,16 +1,15 @@ + +# Fichier : Dockerfile.analyzer + # Étape 1: Utiliser l'image de base officielle FROM mcr.microsoft.com/presidio-analyzer:latest -# Étape 2: Installer le modèle de langue français +# Étape 2: Installer le modèle de langue français comme avant +# (On utilise pip directement, c'est plus fiable) 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 -# ÉTAPE 3 (LA PLUS IMPORTANTE) : ÉCRASER LA CONFIGURATION PAR DÉFAUT -# On copie notre dossier 'conf' DANS le dossier de l'application où -# Presidio s'attend à trouver sa propre configuration. C'est le bon chemin. -COPY ./conf/ /app/presidio_analyzer/conf/ +# Étape 3: Copier notre fichier de configuration personnalisé directement dans l'image, +# à l'emplacement exact que nous avons trouvé. +COPY ./conf/default.yaml /usr/bin/presidio-analyzer/presidio_analyzer/conf/default.yaml -# ÉTAPE 4 : COPIER NOS RÈGLES PYTHON POUR QU'ELLES SOIENT IMPORTABLES -# Le script de démarrage s'exécute depuis /app, donc ce chemin sera valide pour l'import. COPY ./presidio_config/ /app/presidio_config/ - -# ON NE TOUCHE PAS À LA COMMANDE DE DÉMARRAGE. On laisse l'image démarrer normalement.