rajthakkar123 commited on
Commit
46a40b3
·
verified ·
1 Parent(s): e3809ff

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -9
Dockerfile CHANGED
@@ -1,31 +1,32 @@
1
- # Use a Python slim image so we can apt-get system deps
2
  FROM python:3.11-slim
3
 
4
  ENV DEBIAN_FRONTEND=noninteractive
5
  WORKDIR /app
6
 
7
- # Install system packages needed for Chrome + basic utilities
8
  RUN apt-get update && \
9
  apt-get install -y --no-install-recommends \
10
- wget gnupg unzip ca-certificates procps \
11
  fonts-liberation libx11-6 libx11-xcb1 libxcomposite1 libxcursor1 \
12
  libxdamage1 libxrandr2 libgbm1 libasound2 libpangocairo-1.0-0 \
13
- libatk1.0-0 libgtk-3-0 libnss3 libxss1 && \
 
 
14
  apt-get clean && rm -rf /var/lib/apt/lists/*
15
 
16
- # Download and install Google Chrome stable
17
  RUN wget -q -O /tmp/google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
18
  apt-get update && apt-get install -y /tmp/google-chrome.deb || apt-get -f install -y && \
19
  rm -f /tmp/google-chrome.deb && \
20
- # ensure a convenient symlink
21
  ln -sf /opt/google/chrome/google-chrome /usr/bin/google-chrome
22
 
23
- # Copy app files
24
  COPY requirements.txt .
25
  RUN pip install --no-cache-dir -r requirements.txt
26
 
 
27
  COPY app.py .
28
 
29
  EXPOSE 7860
30
-
31
- CMD ["python", "app.py"]
 
1
+ # Dockerfile
2
  FROM python:3.11-slim
3
 
4
  ENV DEBIAN_FRONTEND=noninteractive
5
  WORKDIR /app
6
 
7
+ # Install system packages needed for Chrome + utilities and common deps
8
  RUN apt-get update && \
9
  apt-get install -y --no-install-recommends \
10
+ ca-certificates wget gnupg unzip procps curl lsb-release \
11
  fonts-liberation libx11-6 libx11-xcb1 libxcomposite1 libxcursor1 \
12
  libxdamage1 libxrandr2 libgbm1 libasound2 libpangocairo-1.0-0 \
13
+ libatk1.0-0 libgtk-3-0 libnss3 libxss1 libgconf-2-4 libatk-bridge2.0-0 \
14
+ libc6 libstdc++6 libu2f-udev libvulkan1 libxcb1 libxcb-shm0 libxcb-xfixes0 \
15
+ libcap2 libxkbcommon0 fonts-noto-color-emoji && \
16
  apt-get clean && rm -rf /var/lib/apt/lists/*
17
 
18
+ # Install Google Chrome stable
19
  RUN wget -q -O /tmp/google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
20
  apt-get update && apt-get install -y /tmp/google-chrome.deb || apt-get -f install -y && \
21
  rm -f /tmp/google-chrome.deb && \
 
22
  ln -sf /opt/google/chrome/google-chrome /usr/bin/google-chrome
23
 
24
+ # Python deps
25
  COPY requirements.txt .
26
  RUN pip install --no-cache-dir -r requirements.txt
27
 
28
+ # Copy app
29
  COPY app.py .
30
 
31
  EXPOSE 7860
32
+ CMD ["python", "app.py"]