Spaces:
Sleeping
Sleeping
Neurolingua
commited on
Update Dockerfile
Browse files- Dockerfile +15 -6
Dockerfile
CHANGED
@@ -18,13 +18,22 @@ RUN apt-get update && apt-get install -y \
|
|
18 |
chromium \
|
19 |
&& rm -rf /var/lib/apt/lists/*
|
20 |
|
21 |
-
#
|
22 |
-
RUN
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
chmod +x /usr/local/bin/chromedriver
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
WORKDIR /code
|
29 |
RUN mkdir -p /code/uploads && chmod 755 /code/uploads
|
30 |
|
|
|
18 |
chromium \
|
19 |
&& rm -rf /var/lib/apt/lists/*
|
20 |
|
21 |
+
# install google chrome
|
22 |
+
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
|
23 |
+
RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
|
24 |
+
RUN apt-get -y update
|
25 |
+
RUN apt-get install -y google-chrome-stable
|
|
|
26 |
|
27 |
+
# install chromedriver
|
28 |
+
RUN apt-get install -yqq unzip
|
29 |
+
RUN wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`/chromedriver_linux64.zip
|
30 |
+
RUN unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/
|
31 |
+
|
32 |
+
# set display port to avoid crash
|
33 |
+
ENV DISPLAY=:99
|
34 |
+
|
35 |
+
# install selenium
|
36 |
+
RUN pip install selenium==3.8.0
|
37 |
WORKDIR /code
|
38 |
RUN mkdir -p /code/uploads && chmod 755 /code/uploads
|
39 |
|