forked from interpretml/interpret
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDOCKERFILE
48 lines (42 loc) · 1.53 KB
/
DOCKERFILE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM python:3.7-slim-buster
# Setup CWD
RUN mkdir -p /usr/staging
WORKDIR /usr/staging
# Install dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends sudo bash curl git build-essential valgrind g++-multilib rsync && \
pip install interpret-core[testing,debug] && \
pip install interpret && \
pip uninstall -y interpret && \
pip uninstall -y interpret-core
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
apt-get update && \
apt-get install -y nodejs && \
npm install -g @interpretml/interpret-inline && \
npm uninstall -g @interpretml/interpret-inline
# Install orca (needed for saving images via Plotly)
RUN apt-get update && \
apt-get install -y --no-install-recommends \
wget \
xvfb \
xauth \
libgtk2.0-0 \
libxtst6 \
libxss1 \
libgconf-2-4 \
libnss3 \
libasound2 && \
mkdir -p /opt/orca && \
cd /opt/orca && \
wget https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage && \
chmod +x orca-1.2.1-x86_64.AppImage && \
./orca-1.2.1-x86_64.AppImage --appimage-extract && \
rm orca-1.2.1-x86_64.AppImage && \
printf '#!/bin/bash \nxvfb-run --auto-servernum --server-args "-screen 0 640x480x24" /opt/orca/squashfs-root/app/orca "$@"' > /usr/bin/orca && \
chmod +x /usr/bin/orca
# Clean up installation excess
RUN apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
apt-get autoremove -y
# Set no entrypoint
ENTRYPOINT []