Raw File
DOCKERFILE
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 []
back to top