Skip to content

Commit cabbb19

Browse files
Merge pull request #6 from dpetre/dockerfile
Dockerfile improvements
2 parents b9039e1 + 4bf359d commit cabbb19

File tree

1 file changed

+11
-26
lines changed

1 file changed

+11
-26
lines changed

docker/Dockerfile

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,18 @@
1-
FROM pytorch/pytorch
1+
FROM python:3.7-slim-buster
22

3-
# Installing build dependencies
4-
RUN apt-get update && apt-get install -y git curl unzip
5-
6-
RUN apt-get install -y xorg
3+
WORKDIR /fred
74

8-
RUN curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add && \
9-
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list && \
10-
apt-get -y update && \
11-
apt-get -y install google-chrome-stable
12-
13-
# Prepare environment UTF-8
14-
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y locales
15-
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
16-
locale-gen
17-
ENV LANG en_US.UTF-8
18-
ENV LANGUAGE en_US:en
19-
ENV LC_ALL en_US.UTF-8
5+
# Installing build dependencies
6+
RUN apt-get update && apt-get install -y curl libnss3-dev libcups2-dev libasound2-dev libatk1.0-dev libatk-bridge2.0-dev libgtk-3-dev libpangocairo-1.0-0 python3-pip xorg && apt-get clean
207

21-
# Prepare fred
22-
RUN mkdir /work && \
23-
cd /work && \
24-
git clone https://github.com/adobe/frontend-regression-validator.git
8+
COPY requirements.txt .
9+
RUN pip3 install -r requirements.txt
10+
RUN pyppeteer-install
2511

26-
# Preparing Python build environment
27-
RUN /opt/conda/bin/activate base && python3 -m pip install -r /work/frontend-regression-validator/requirements.txt
12+
COPY fred/ .
2813

2914
# Extract the model files
30-
RUN cd /work/frontend-regression-validator/fred/inference && cat model_files.bz2.parta* > model_files.bz2 && tar xjf model_files.bz2
15+
RUN cd inference && cat model_files.bz2.parta* > model_files.bz2 && tar xjf model_files.bz2 && rm -f model_files.bz2*
3116

32-
# Start notebook
33-
CMD cd /work/frontend-regression-validator/fred && git pull && python3 run.py
17+
CMD python3 run.py
18+
EXPOSE 5000

0 commit comments

Comments
 (0)