mgbam commited on
Commit
4494e37
·
verified ·
1 Parent(s): ec959b4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -12
Dockerfile CHANGED
@@ -5,22 +5,21 @@ ENV PYTHONUNBUFFERED=1
5
  # Prevents interactive prompts during apt-get install
6
  ENV DEBIAN_FRONTEND=noninteractive
7
 
8
- # Install base system dependencies including debconf-utils
9
  RUN apt-get update && \
10
  apt-get install -y --no-install-recommends \
11
  ffmpeg \
12
  libsm6 \
13
  libxext6 \
14
  fontconfig \
15
- debconf-utils
16
-
17
- # Pre-accept EULA and install Microsoft Core Fonts
18
- # Using full path for debconf-set-sections for robustness
19
- RUN echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | /usr/bin/debconf-set-sections && \
20
- apt-get install -y --no-install-recommends ttf-mscorefonts-installer
21
-
22
- # Update font cache and clean up
23
- RUN fc-cache -f -v && \
24
  apt-get clean && \
25
  rm -rf /var/lib/apt/lists/*
26
 
@@ -49,6 +48,4 @@ COPY --chown=appuser:appgroup . .
49
  EXPOSE 8501
50
 
51
  # Command to run Streamlit
52
- # Using server.headless=true is good practice for containers.
53
- # Streamlit will try to create .streamlit in the user's home dir (/home/appuser)
54
  CMD ["streamlit", "run", "app.py", "--server.headless=true", "--server.port=8501", "--server.fileWatcherType=none"]
 
5
  # Prevents interactive prompts during apt-get install
6
  ENV DEBIAN_FRONTEND=noninteractive
7
 
8
+ # Install ALL system dependencies, including fonts, in a single RUN to ensure PATH consistency
9
  RUN apt-get update && \
10
  apt-get install -y --no-install-recommends \
11
  ffmpeg \
12
  libsm6 \
13
  libxext6 \
14
  fontconfig \
15
+ debconf-utils && \ # debconf-utils installed here
16
+ # For Microsoft Core Fonts EULA pre-acceptance, use full path for robustness
17
+ echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | /usr/bin/debconf-set-sections && \
18
+ # Install Microsoft Core Fonts
19
+ apt-get install -y --no-install-recommends ttf-mscorefonts-installer && \
20
+ # Update font cache
21
+ fc-cache -f -v && \
22
+ # Clean up
 
23
  apt-get clean && \
24
  rm -rf /var/lib/apt/lists/*
25
 
 
48
  EXPOSE 8501
49
 
50
  # Command to run Streamlit
 
 
51
  CMD ["streamlit", "run", "app.py", "--server.headless=true", "--server.port=8501", "--server.fileWatcherType=none"]