FROM python:3.9-slim # Installer les dépendances nécessaires pour Homebrew RUN apt-get update && apt-get install -y \ curl \ git \ build-essential \ && rm -rf /var/lib/apt/lists/* # Installer Homebrew RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" RUN echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> ~/.bashrc RUN echo 'export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"' >> ~/.bashrc # Charger Homebrew dans la session actuelle RUN echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /root/.bashrc ENV PATH "/home/linuxbrew/.linuxbrew/bin:$PATH" # Installer FontForge avec Homebrew RUN brew install fontforge # Installer les dépendances Python COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copier le code de l'application COPY app.py . COPY create_font.pe . # Définir le répertoire de travail WORKDIR /app # Commande pour exécuter l'application Gradio CMD ["bash", "-c", "source ~/.bashrc && python app.py"]