Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +12 -2
Dockerfile
CHANGED
|
@@ -17,15 +17,25 @@ RUN apt-get update && apt-get install -y \
|
|
| 17 |
libxtst6 \
|
| 18 |
libxi6 \
|
| 19 |
libgbm-dev \
|
|
|
|
| 20 |
&& rm -rf /var/lib/apt/lists/*
|
| 21 |
|
| 22 |
-
# Install Chrome
|
| 23 |
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
|
| 24 |
-
&& echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list \
|
| 25 |
&& apt-get update \
|
| 26 |
&& apt-get install -y google-chrome-stable \
|
| 27 |
&& rm -rf /var/lib/apt/lists/*
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
# Copy requirements and install Python dependencies
|
| 30 |
COPY requirements.txt .
|
| 31 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
| 17 |
libxtst6 \
|
| 18 |
libxi6 \
|
| 19 |
libgbm-dev \
|
| 20 |
+
libasound2 \
|
| 21 |
&& rm -rf /var/lib/apt/lists/*
|
| 22 |
|
| 23 |
+
# Install Google Chrome
|
| 24 |
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
|
| 25 |
+
&& echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list \
|
| 26 |
&& apt-get update \
|
| 27 |
&& apt-get install -y google-chrome-stable \
|
| 28 |
&& rm -rf /var/lib/apt/lists/*
|
| 29 |
|
| 30 |
+
# Install ChromeDriver
|
| 31 |
+
RUN CHROME_VERSION=$(google-chrome --version | grep -oP '\d+\.\d+\.\d+') \
|
| 32 |
+
&& CHROMEDRIVER_VERSION=$(curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_VERSION}) \
|
| 33 |
+
&& wget -q https://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip \
|
| 34 |
+
&& unzip chromedriver_linux64.zip \
|
| 35 |
+
&& mv chromedriver /usr/local/bin/ \
|
| 36 |
+
&& chmod +x /usr/local/bin/chromedriver \
|
| 37 |
+
&& rm chromedriver_linux64.zip
|
| 38 |
+
|
| 39 |
# Copy requirements and install Python dependencies
|
| 40 |
COPY requirements.txt .
|
| 41 |
RUN pip install --no-cache-dir -r requirements.txt
|