<commit_before>FROM nvidia/cuda:8.0-cudnn6-devel-ubuntu16.04

MAINTAINER <NAME> <<EMAIL>>

# ENV http_proxy "http://wwwproxy.qinetiq.com:80"
# ENV https_proxy "http://wwwproxy.qinetiq.com:80"

# Configure environment
ENV DEBIAN_FRONTEND=noninteractive SHELL=/bin/bash NAME=ubuntu-base-data-science DATASCI_USER=datasci DATASCI_UID=1000
ENV HOME=/home/$DATASCI_USER
ENV CONDA_DIR=/opt/conda CONDA_SRC=/usr/local/src/conda
ENV PATH $CONDA_DIR/bin:$HOME/.local/bin:$PATH
ENV Documents=$HOME/Documents Downloads=$HOME/Downloads Workspace=$HOME/Workspace

# SHA Currently failing
ENV TINI_VERSION=v0.15.0 TINI_CHECKSUM=595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7 TINI_DIR=/opt/tini
ENV JDK_VERSION=8u144

RUN apt-get update && apt-get --yes upgrade && apt-get --yes --no-install-recommends install aptitude apt-utils sudo locales && \
apt-get clean all && rm -rf /var/lib/apt/lists/*
# Locale
RUN sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen && \
    locale-gen
ENV LANG en_GB.UTF-8
ENV LANGUAGE en_GB:en
ENV LC_ALL en_GB.UTF-8

COPY Scripts/Linux/setup_datasci_user.sh /tmp/
RUN bash /tmp/setup_datasci_user.sh

VOLUME ["$Documents", "$Downloads", "$Workspace"]

ENV Jupyter_Share=/usr/local/share/jupyter
RUN mkdir -p $Jupyter_Share && chown -R $DATASCI_USER:$DATASCI_USER $Jupyter_Share
RUN mkdir -p /etc/jupyter && chown -R $DATASCI_USER:$DATASCI_USER /etc/jupyter/

RUN cd /opt/ && wget https://download-cf.jetbrains.com/python/pycharm-community-2017.2.1.tar.gz && tar -xzf pycharm-community-2017.2.1.tar.gz
RUN rm /opt/pycharm-community-2017.2.1.tar.gz
RUN chown -R $DATASCI_USER:$DATASCI_USER /opt/pycharm-community-2017.2.1

USER $DATASCI_USER

ENV PYTHON_VERSION=3 ANACONDA_VERSION=5.0.0.1 LINUX_VERSION=x86_64
ENV ANACONDA=Anaconda$PYTHON_VERSION-$ANACONDA_VERSION-Linux-$LINUX_VERSION.sh

COPY Scripts/Conda/install_anaconda.sh /tmp/
RUN bash /tmp/install_anaconda.sh
COPY Scripts/Conda/install_conda_base.sh /tmp/
RUN bash /tmp/install_conda_base.sh
USER root

RUN apt-get update && apt-get upgrade --yes && apt-get install --yes libedit-dev libbsd-dev libncurses-dev libreadline6 libreadline-dev libreadline6-dev libtinfo-dev texinfo

USER $DATASCI_USER
ENV OCTAVE_VERSION=4.2.1
COPY Scripts/Conda/install_octave.sh /tmp/

RUN bash /tmp/install_octave.sh

RUN cd /tmp &&  wget https://downloads.sourceforge.net/octave/control-3.0.0.tar.gz \
    && wget https://downloads.sourceforge.net/octave/signal-1.3.2.tar.gz \
    && wget https://downloads.sourceforge.net/octave/statistics-1.3.0.tar.gz \
    && wget https://downloads.sourceforge.net/octave/io-2.4.7.tar.gz
USER root
RUN add-apt-repository ppa:ubuntu-toolchain-r/test
RUN apt-get update && apt-get install --yes  build-essential
RUN apt-get update && apt-get install --yes libstdc++6 libstdc++-6-dev libblas-dev libgfortran3 libc6 libc6-dev libgcc1  gcc-7 g++-7 libgcc-7-dev libstdc++-7-dev gfortran-7
RUN rm $CONDA_DIR/lib/libtinfo.so.5
RUN apt-get update && apt-get install --yes gcc-5 libgcc-5-dev libstdc++-5-dev gfortran-5 gcc-6 libgcc-6-dev libstdc++-6-dev gfortran-6

<<<<<<< HEAD
RUN ldconfig
USER $DATASCI_USER
RUN mkdir /home/datasci/octave
RUN cd /tmp && octave --eval 'pkg update'
RUN cd /tmp && octave --eval "cd /home/datasci/octave; \
                              more off; \
                              pkg install -global -forge -verbose control"

RUN octave --eval "cd /home/datasci/octave; \
                    more off; \
                    pkg install -global -forge -verbose general signal image io statistics"

COPY Scripts/Octave/qt-settings $HOME/.config/octave/
RUN sudo chown datasci:datasci $HOME/.config/octave/qt-settings
# RUN apt-get update && apt-get install --yes graphviz
# RUN wget http://sourceforge.net/projects/octave/files/Octave%20Forge%20Packages/Individual%20Package%20Releases/control-2.8.0.tar.gz -P /home/datasci/octave
# RUN wget http://sourceforge.net/projects/octave/files/Octave%20Forge%20Packages/Individual%20Package%20Releases/general-1.3.4.tar.gz -P /home/datasci/octave
# RUN wget http://sourceforge.net/projects/octave/files/Octave%20Forge%20Packages/Individual%20Package%20Releases/signal-1.3.0.tar.gz -P /home/datasci/octave
# RUN wget http://sourceforge.net/projects/octave/files/Octave%20Forge%20Packages/Individual%20Package%20Releases/image-2.2.2.tar.gz -P /home/datasci/octave
# RUN wget http://sourceforge.net/projects/octave/files/Octave%20Forge%20Packages/Individual%20Package%20Releases/io-2.0.2.tar.gz -P /home/datasci/octave
# RUN wget http://sourceforge.net/projects/octave/files/Octave%20Forge%20Packages/Individual%20Package%20Releases/statistics-1.2.4.tar.gz -P /home/datasci/octave
#
# # Install Octave forge packages
# RUN octave --eval "cd /home/datasci/octave; \
#                    more off; \
#                    pkg install -auto -global -verbose \
#                    control-2.8.0.tar.gz \
#                    general-1.3.4.tar.gz \
#                    signal-1.3.0.tar.gz \<commit_msg>update octave<commit_after>FROM nvidia/cuda:8.0-cudnn6-devel-ubuntu16.04

MAINTAINER <NAME> <<EMAIL>>

# ENV http_proxy "http://wwwproxy.qinetiq.com:80"
# ENV https_proxy "http://wwwproxy.qinetiq.com:80"

# Configure environment
ENV DEBIAN_FRONTEND=noninteractive SHELL=/bin/bash NAME=ubuntu-base-data-science DATASCI_USER=datasci DATASCI_UID=1000
ENV HOME=/home/$DATASCI_USER
ENV CONDA_DIR=/opt/conda CONDA_SRC=/usr/local/src/conda
ENV PATH $CONDA_DIR/bin:$HOME/.local/bin:$PATH
ENV Documents=$HOME/Documents Downloads=$HOME/Downloads Workspace=$HOME/Workspace

# SHA Currently failing
ENV TINI_VERSION=v0.15.0 TINI_CHECKSUM=595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7 TINI_DIR=/opt/tini
ENV JDK_VERSION=8u144

RUN apt-get update && apt-get --yes upgrade && apt-get --yes --no-install-recommends install aptitude apt-utils sudo locales && \
apt-get clean all && rm -rf /var/lib/apt/lists/*
# Locale
RUN sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen && \
    locale-gen
ENV LANG en_GB.UTF-8
ENV LANGUAGE en_GB:en
ENV LC_ALL en_GB.UTF-8

COPY Scripts/Linux/setup_datasci_user.sh /tmp/
RUN bash /tmp/setup_datasci_user.sh

VOLUME ["$Documents", "$Downloads", "$Workspace"]

ENV Jupyter_Share=/usr/local/share/jupyter
RUN mkdir -p $Jupyter_Share && chown -R $DATASCI_USER:$DATASCI_USER $Jupyter_Share
RUN mkdir -p /etc/jupyter && chown -R $DATASCI_USER:$DATASCI_USER /etc/jupyter/

RUN cd /opt/ && wget https://download-cf.jetbrains.com/python/pycharm-community-2017.2.1.tar.gz && tar -xzf pycharm-community-2017.2.1.tar.gz
RUN rm /opt/pycharm-community-2017.2.1.tar.gz
RUN chown -R $DATASCI_USER:$DATASCI_USER /opt/pycharm-community-2017.2.1

USER $DATASCI_USER

ENV PYTHON_VERSION=3 ANACONDA_VERSION=5.0.0.1 LINUX_VERSION=x86_64
ENV ANACONDA=Anaconda$PYTHON_VERSION-$ANACONDA_VERSION-Linux-$LINUX_VERSION.sh

COPY Scripts/Conda/install_anaconda.sh /tmp/
RUN bash /tmp/install_anaconda.sh
COPY Scripts/Conda/install_conda_base.sh /tmp/
RUN bash /tmp/install_conda_base.sh
USER root

RUN apt-get update && apt-get upgrade --yes && apt-get install --yes libedit-dev libbsd-dev libncurses-dev libreadline6 libreadline-dev libreadline6-dev libtinfo-dev texinfo

USER $DATASCI_USER
ENV OCTAVE_VERSION=4.2.1
COPY Scripts/Conda/install_octave.sh /tmp/

RUN bash /tmp/install_octave.sh

RUN cd /tmp &&  wget https://downloads.sourceforge.net/octave/control-3.0.0.tar.gz \
    && wget https://downloads.sourceforge.net/octave/signal-1.3.2.tar.gz \
    && wget https://downloads.sourceforge.net/octave/statistics-1.3.0.tar.gz \
    && wget https://downloads.sourceforge.net/octave/io-2.4.7.tar.gz
USER root
RUN add-apt-repository ppa:ubuntu-toolchain-r/test
RUN apt-get update && apt-get install --yes  build-essential
RUN apt-get update && apt-get install --yes libstdc++6 libstdc++-6-dev libblas-dev libgfortran3 libc6 libc6-dev libgcc1  gcc-7 g++-7 libgcc-7-dev libstdc++-7-dev gfortran-7
RUN rm $CONDA_DIR/lib/libtinfo.so.5
RUN apt-get update && apt-get install --yes gcc-5 libgcc-5-dev libstdc++-5-dev gfortran-5 gcc-6 libgcc-6-dev libstdc++-6-dev gfortran-6

RUN ldconfig
USER $DATASCI_USER
RUN mkdir /home/datasci/octave
RUN cd /tmp && octave --eval 'pkg update'
RUN cd /tmp && octave --eval "cd /home/datasci/octave; \
                              more off; \
                              pkg install -global -forge -verbose control"

RUN octave --eval "cd /home/datasci/octave; \
                    more off; \
                    pkg install -global -forge -verbose general signal image io statistics"

COPY Scripts/Octave/qt-settings $HOME/.config/octave/
RUN sudo chown datasci:datasci $HOME/.config/octave/qt-settings
# RUN apt-get update && apt-get install --yes graphviz
# RUN wget http://sourceforge.net/projects/octave/files/Octave%20Forge%20Packages/Individual%20Package%20Releases/control-2.8.0.tar.gz -P /home/datasci/octave
# RUN wget http://sourceforge.net/projects/octave/files/Octave%20Forge%20Packages/Individual%20Package%20Releases/general-1.3.4.tar.gz -P /home/datasci/octave
# RUN wget http://sourceforge.net/projects/octave/files/Octave%20Forge%20Packages/Individual%20Package%20Releases/signal-1.3.0.tar.gz -P /home/datasci/octave
# RUN wget http://sourceforge.net/projects/octave/files/Octave%20Forge%20Packages/Individual%20Package%20Releases/image-2.2.2.tar.gz -P /home/datasci/octave
# RUN wget http://sourceforge.net/projects/octave/files/Octave%20Forge%20Packages/Individual%20Package%20Releases/io-2.0.2.tar.gz -P /home/datasci/octave
# RUN wget http://sourceforge.net/projects/octave/files/Octave%20Forge%20Packages/Individual%20Package%20Releases/statistics-1.2.4.tar.gz -P /home/datasci/octave
#
# # Install Octave forge packages
# RUN octave --eval "cd /home/datasci/octave; \
#                    more off; \
#                    pkg install -auto -global -verbose \
#                    control-2.8.0.tar.gz \
#                    general-1.3.4.tar.gz \
#                    signal-1.3.0.tar.gz \
{'fraction_non_alphanumeric': 0.135047907211296, 'fraction_numerical': 0.03973777105395865, 'mean_word_length': 3.561177552897884, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 9, 'https://': 10, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 18, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5957419', 'n_tokens_mistral': 4091, 'n_tokens_neox': 3781, 'n_words': 684}