Created
March 3, 2017 15:38
-
-
Save joelkr/bb9e984b76c6f5588cd4817639878eec to your computer and use it in GitHub Desktop.
Docker file for kaggle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:16.04 | |
#FROM ubuntu:14.04 | |
# Extended and moved to python 3 based on image: | |
#MAINTAINER Wise.io, Inc. <[email protected]> | |
ENV DEBIAN_FRONTEND noninteractive | |
ENV PATH /anaconda/bin:$PATH | |
# For image inheritance. | |
ONBUILD ENV PATH /anaconda/bin:$PATH | |
# Install packages ... change the timezone line if you're not in Pacific time | |
RUN apt-get -y update && apt-get install -y wget nano locales curl unzip wget openssl libhdf5-dev libpq-dev \ | |
python3-pip python3-dev python3-numpy python3-scipy python3-matplotlib \ | |
ipython3 ipython3-notebook python3-pandas python3-nose \ | |
python3-dateutil \ | |
&& apt-get clean && dpkg-reconfigure locales && locale-gen en_US.UTF-8 \ | |
&& echo "America/Los_Angeles" > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata \ | |
&& apt-get autoremove \ | |
&& pip3 install scikit-learn==0.18.1 nltk==3.2.1 pytest==3.0.5 \ | |
&& python3 -m nltk.downloader -d /usr/local/share/nltk_data punkt book \ | |
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | |
# Get the pip packages and clean up | |
ADD requirements.txt / | |
RUN pip3 install -r /requirements.txt && rm -rf /root/.cache/pip/* | |
ENV LANGUAGE en_US.UTF-8 | |
ENV LANG en_US.UTF-8 | |
# $PASSWORD will get `unset` within notebook.sh, turned into an IPython style hash | |
ENV PASSWORD Dont make this your default | |
ENV USE_HTTP 1 | |
ADD notebook.sh /notebook.sh | |
RUN chmod a+x /notebook.sh | |
EXPOSE 8888 | |
RUN useradd --user-group --create-home --shell /bin/false workspace | |
ENV HOME=/home/workspace | |
ADD . $HOME | |
WORKDIR $HOME | |
ENV PEM_FILE $HOME/key.pem | |
COPY ./.keras $HOME/.keras | |
RUN chown -R workspace:workspace $HOME/* | |
USER workspace | |
CMD ["/notebook.sh"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment