Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker file fetched from mil-resource has the wrong content #12

Open
vingu opened this issue Jan 6, 2019 · 2 comments
Open

Docker file fetched from mil-resource has the wrong content #12

vingu opened this issue Jan 6, 2019 · 2 comments

Comments

@vingu
Copy link

vingu commented Jan 6, 2019

Following the instruction to build the Docker image,

  1. Fetch the Dockerfile from the mli-resources repo.
    $ curl https://raw.githubusercontent.com/h2oai/mli-resources/master/anaconda_py36_h2o_xgboost_graphviz/Dockerfile > anaconda_py36_h2o_xgboost_graphviz/Dockerfile

The resulted Docker file contains the status code rather the content itself. Do this instead,
curl https://raw.githubusercontent.com/h2oai/mli-resources/master/anaconda_py36_h2o_xgboost_graphviz/Dockerfile | Select-Object -ExpandProperty Content

@jphall663
Copy link
Contributor

jphall663 commented Jan 6, 2019

Hmm works as expected for me following instructions:



patrickh@patrickh-XPS-13-9370:~$ curl https://raw.githubusercontent.com/h2oai/mli-resources/master/anaconda_py36_h2o_xgboost_graphviz/Dockerfile > anaconda_py36_h2o_xgboost_graphviz/Dockerfile
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2151  100  2151    0     0   8226      0 --:--:-- --:--:-- --:--:--  8241

patrickh@patrickh-XPS-13-9370:~$ cat anaconda_py36_h2o_xgboost_graphviz/Dockerfile

# Install and start docker
# Then this file may be used to create a Docker container using:
# $ docker build anaconda_py35_h2o_xgboost_graphviz
# $ docker run -i -t -p 8888:8888 <image_id> /bin/bash -c "/opt/conda/bin/conda install jupyter -y --quiet && /opt/conda/bin/jupyter notebook --notebook-dir=/mli-resources --ip='*' --port=8888 --no-browser --allow-root"
# Open a browser and navigate to localhost:8888

# Base debian system
FROM debian:8.5
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8

# Update OS
RUN apt-get update --fix-missing && apt-get install -y wget bzip2 ca-certificates \
    libglib2.0-0 libxext6 libsm6 libxrender1 \
    git mercurial subversion

# Anaconda Python 3.6 
RUN echo 'export PATH=/opt/conda/bin:$PATH' > /etc/profile.d/conda.sh && \
    wget --quiet https://repo.continuum.io/archive/Anaconda3-5.1.0-Linux-x86_64.sh -O ~/anaconda.sh && \
    /bin/bash ~/anaconda.sh -b -p /opt/conda && \
    rm ~/anaconda.sh

RUN apt-get install -y curl grep sed dpkg && \
    TINI_VERSION=`curl https://github.com/krallin/tini/releases/latest | grep -o "/v.*\"" | sed 's:^..\(.*\).$:\1:'` && \
    curl -L "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.deb" > tini.deb && \
    dpkg -i tini.deb && \
    rm tini.deb && \
    apt-get clean

ENV PATH /opt/conda/bin:$PATH

ENTRYPOINT [ "/usr/bin/tini", "--" ]
CMD [ "/bin/bash" ]

# Java
RUN apt-get -y -f install default-jdk

# H2o deps
RUN pip install requests && \
    pip install tabulate && \
    pip install six && \
    pip install future && \
    pip install colorama

# H2o, version seems very important
RUN pip uninstall h2o || true && \
    pip install h2o==3.20.0.4 
# Git
RUN apt-get -y install git

# Examples
RUN git clone https://github.com/h2oai/mli-resources.git

# XGBoost
RUN apt-get update --fix-missing && \
    apt-get -y install gcc g++ make && \
    conda install -y libgcc && \
    git clone --recursive https://github.com/dmlc/xgboost.git && \
    cd xgboost && \
    make && \
    cd python-package && \
    python setup.py install --user

# GraphViz
RUN apt-get -y install graphviz

# Tree Shap/ELI5
RUN pip install shap eli5```

@jphall663
Copy link
Contributor

@vingu - What is your OS?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants