Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +12 -20
Dockerfile
CHANGED
|
@@ -1,35 +1,27 @@
|
|
| 1 |
-
# Utilise une image de base Python officielle
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
|
|
|
| 8 |
rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
-
#
|
| 11 |
-
RUN wget
|
| 12 |
-
apt-
|
| 13 |
-
|
| 14 |
-
rm google-chrome-stable_current_amd64.deb
|
| 15 |
|
| 16 |
-
#
|
| 17 |
-
RUN
|
| 18 |
-
DRIVER_VERSION=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_VERSION") && \
|
| 19 |
-
wget -q "https://chromedriver.storage.googleapis.com/${DRIVER_VERSION}/chromedriver_linux64.zip" && \
|
| 20 |
unzip chromedriver_linux64.zip && \
|
| 21 |
mv chromedriver /usr/bin/chromedriver && \
|
| 22 |
chmod +x /usr/bin/chromedriver && \
|
| 23 |
rm chromedriver_linux64.zip
|
| 24 |
|
| 25 |
-
# Création du dossier d'app
|
| 26 |
WORKDIR /app
|
| 27 |
-
|
| 28 |
-
# Copie des fichiers
|
| 29 |
COPY . .
|
| 30 |
-
|
| 31 |
-
# Installation des dépendances Python
|
| 32 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 33 |
|
| 34 |
-
# Lancement de l'app Streamlit
|
| 35 |
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
|
|
|
|
|
|
|
|
|
| 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 |
+
|