PyQuarX commited on
Commit
dd37df9
·
verified ·
1 Parent(s): f9dffaf

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -16
Dockerfile CHANGED
@@ -1,27 +1,22 @@
1
  FROM python:3.10-slim
2
 
 
3
  RUN apt-get update && apt-get install -y \
4
- wget unzip curl gnupg ca-certificates fonts-liberation libappindicator3-1 \
5
- libasound2 libatk-bridge2.0-0 libatk1.0-0 libcups2 libdbus-1-3 libgdk-pixbuf2.0-0 \
6
- libnspr4 libnss3 libx11-xcb1 libxcomposite1 libxdamage1 libxrandr2 xdg-utils \
7
- libu2f-udev libvulkan1 && \
8
  rm -rf /var/lib/apt/lists/*
9
 
10
- # Install Chrome 114
11
- RUN wget https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.90-1_amd64.deb && \
12
- apt install -y ./google-chrome-stable_114.0.5735.90-1_amd64.deb && \
13
- rm google-chrome-stable_114.0.5735.90-1_amd64.deb
14
-
15
- # Install matching Chromedriver (114)
16
- RUN wget -q https://chromedriver.storage.googleapis.com/114.0.5735.90/chromedriver_linux64.zip && \
17
- unzip chromedriver_linux64.zip && \
18
- mv chromedriver /usr/bin/chromedriver && \
19
- chmod +x /usr/bin/chromedriver && \
20
- rm chromedriver_linux64.zip
21
 
22
  WORKDIR /app
23
  COPY . .
 
 
24
  RUN pip install --no-cache-dir -r requirements.txt
25
 
 
26
  CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
27
-
 
1
  FROM python:3.10-slim
2
 
3
+ # Install system dependencies
4
  RUN apt-get update && apt-get install -y \
5
+ chromium chromium-driver wget curl unzip gnupg ca-certificates \
6
+ libnss3 libgconf-2-4 libxi6 libxcursor1 libxdamage1 libxrandr2 libatk-bridge2.0-0 \
7
+ libgtk-3-0 libxss1 libasound2 libxcomposite1 libxfixes3 libxrender1 libxtst6 \
8
+ fonts-liberation xdg-utils && \
9
  rm -rf /var/lib/apt/lists/*
10
 
11
+ # Set environment variables for Chromium
12
+ ENV CHROME_BIN=/usr/bin/chromium
13
+ ENV CHROMEDRIVER_PATH=/usr/lib/chromium/chromedriver
 
 
 
 
 
 
 
 
14
 
15
  WORKDIR /app
16
  COPY . .
17
+
18
+ # Install Python dependencies
19
  RUN pip install --no-cache-dir -r requirements.txt
20
 
21
+ # Run the Streamlit app
22
  CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]