imCuteCat commited on
Commit
21ac084
1 Parent(s): 71aad4e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -2
Dockerfile CHANGED
@@ -4,17 +4,27 @@ FROM python:3.9-slim
4
  RUN apt-get update && apt-get install -y \
5
  ffmpeg \
6
  imagemagick \
 
7
  && apt-get clean \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
  # Install pip packages
11
  RUN pip install gradio==3.50.2
12
 
13
- # Set the working directory
14
- WORKDIR /src
 
 
 
 
 
 
15
 
16
  # Copy the rest of the application code
17
  COPY . /src
18
 
 
 
 
19
  # Set the entry point to run the prediction script
20
  ENTRYPOINT ["python", "predict.py"]
 
4
  RUN apt-get update && apt-get install -y \
5
  ffmpeg \
6
  imagemagick \
7
+ fontconfig \
8
  && apt-get clean \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
  # Install pip packages
12
  RUN pip install gradio==3.50.2
13
 
14
+ # Set environment variables for matplotlib and fontconfig
15
+ ENV MPLCONFIGDIR=/tmp/matplotlib
16
+ ENV FONTCONFIG_PATH=/etc/fonts
17
+
18
+ # Create needed directories with correct permissions
19
+ RUN mkdir /tmp/matplotlib
20
+ RUN mkdir /src/fonts && \
21
+ fc-cache -fv /src/fonts
22
 
23
  # Copy the rest of the application code
24
  COPY . /src
25
 
26
+ # Set the working directory
27
+ WORKDIR /src
28
+
29
  # Set the entry point to run the prediction script
30
  ENTRYPOINT ["python", "predict.py"]