ChevalierJoseph commited on
Commit
92b3959
·
verified ·
1 Parent(s): a062153

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -8
Dockerfile CHANGED
@@ -1,23 +1,43 @@
1
  FROM python:3.9-slim
2
 
3
- # Install system dependencies including FontForge
4
  RUN apt-get update && apt-get install -y \
5
- fontforge \
6
- wget \
7
  build-essential \
8
- python3-dev \
 
 
 
 
 
 
 
 
 
 
 
 
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
- # Install Python dependencies
 
 
 
 
 
 
 
 
 
 
12
  COPY requirements.txt .
13
  RUN pip install --no-cache-dir -r requirements.txt
14
 
15
- # Copy the application code
16
  COPY app.py .
17
  COPY create_font.pe .
18
 
19
- # Set the working directory
20
  WORKDIR /app
21
 
22
- # Command to run the Gradio app
23
  CMD ["python", "app.py"]
 
1
  FROM python:3.9-slim
2
 
3
+ # Installer les dépendances système incluant FontForge et ses dépendances
4
  RUN apt-get update && apt-get install -y \
 
 
5
  build-essential \
6
+ wget \
7
+ git \
8
+ autoconf \
9
+ libtool \
10
+ pkg-config \
11
+ libfontforge-dev \
12
+ libspiro-dev \
13
+ libuninameslist-dev \
14
+ libfreetype6-dev \
15
+ libgdk-pixbuf2.0-dev \
16
+ libcairo2-dev \
17
+ libpango1.0-dev \
18
+ libglib2.0-dev \
19
  && rm -rf /var/lib/apt/lists/*
20
 
21
+ # Télécharger et installer FontForge à partir de la source
22
+ RUN git clone https://github.com/fontforge/fontforge.git \
23
+ && cd fontforge \
24
+ && git checkout 20200314 \
25
+ && ./autogen.sh \
26
+ && ./configure \
27
+ && make \
28
+ && make install \
29
+ && ldconfig
30
+
31
+ # Installer les dépendances Python
32
  COPY requirements.txt .
33
  RUN pip install --no-cache-dir -r requirements.txt
34
 
35
+ # Copier le code de l'application
36
  COPY app.py .
37
  COPY create_font.pe .
38
 
39
+ # Définir le répertoire de travail
40
  WORKDIR /app
41
 
42
+ # Commande pour exécuter l'application Gradio
43
  CMD ["python", "app.py"]