vikarshana commited on
Commit
87e04b2
·
verified ·
1 Parent(s): 3b2e092

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -5
Dockerfile CHANGED
@@ -4,7 +4,7 @@ FROM python:3.10-slim
4
  # Set working directory
5
  WORKDIR /app
6
 
7
- # Install essential build tools and HTTPS transport for apt
8
  RUN apt-get update && apt-get install -y --no-install-recommends \
9
  ca-certificates \
10
  curl \
@@ -16,17 +16,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
16
  apt-transport-https \
17
  && rm -rf /var/lib/apt/lists/*
18
 
19
- # Add Google Chrome APT key and repo (with proper keyring)
20
  RUN mkdir -p /etc/apt/keyrings \
21
  && curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /etc/apt/keyrings/google-chrome.gpg \
22
  && echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list
23
 
24
- # Update and install Chrome + required GUI/libs (split into two RUN for better caching and debugging)
25
  RUN apt-get update && apt-get install -y --no-install-recommends \
26
  google-chrome-stable \
27
  libglib2.0-0 \
28
  libnss3 \
29
- libgconf-2-4 \
30
  libfontconfig1 \
31
  libx11-6 \
32
  libx11-xcb1 \
@@ -66,5 +65,5 @@ COPY . .
66
  # Expose port
67
  EXPOSE 7860
68
 
69
- # Run app
70
  CMD ["python", "app.py"]
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
+ # Install essential tools + HTTPS support
8
  RUN apt-get update && apt-get install -y --no-install-recommends \
9
  ca-certificates \
10
  curl \
 
16
  apt-transport-https \
17
  && rm -rf /var/lib/apt/lists/*
18
 
19
+ # Add Google Chrome repo
20
  RUN mkdir -p /etc/apt/keyrings \
21
  && curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /etc/apt/keyrings/google-chrome.gpg \
22
  && echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list
23
 
24
+ # Install Chrome + required libraries (REMOVED libgconf-2-4)
25
  RUN apt-get update && apt-get install -y --no-install-recommends \
26
  google-chrome-stable \
27
  libglib2.0-0 \
28
  libnss3 \
 
29
  libfontconfig1 \
30
  libx11-6 \
31
  libx11-xcb1 \
 
65
  # Expose port
66
  EXPOSE 7860
67
 
68
+ # Run app — Hugging Face Spaces ignores EXPOSE and CMD port, but we keep for clarity
69
  CMD ["python", "app.py"]