Skip to content

Commit 89f5dec

Browse files
author
Petru Dumuta
committed
Docker image improvements
1 parent b9039e1 commit 89f5dec

File tree

1 file changed

+10
-27
lines changed

1 file changed

+10
-27
lines changed

docker/Dockerfile

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,16 @@
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
7-
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
3+
WORKDIR /fred
4+
COPY requirements.txt .
5+
RUN pip3 install -r requirements.txt
126

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
20-
21-
# Prepare fred
22-
RUN mkdir /work && \
23-
cd /work && \
24-
git clone https://github.com/adobe/frontend-regression-validator.git
7+
# Installing build dependencies
8+
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
259

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

2912
# 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
13+
RUN cd inference && cat model_files.bz2.parta* > model_files.bz2 && tar xjf model_files.bz2 && rm -f model_files.bz2*
3114

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

0 commit comments

Comments
 (0)