17 lines
865 B
Docker
17 lines
865 B
Docker
# É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
|
|
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 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.
|