Spaces:
Runtime error
Runtime error
File size: 1,053 Bytes
3a61bea 7173624 3a61bea 7173624 92b3959 7173624 3a61bea 7173624 92b3959 3a61bea 92b3959 fd33894 3a61bea 92b3959 3a61bea 92b3959 7173624 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
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"]
|