<commit_before># ==================================================================
# module list
# ------------------------------------------------------------------
# python        3.7    (apt)
# jupyter       latest (pip)
# pytorch       latest (pip)
# tensorflow    latest (pip)
# keras         latest (pip)
# mxnet         latest (pip)
# gluonts       latest (pip)
# opencv        4.3.0  (git)
# ==================================================================

FROM nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04

ENV CUDA_HOME=/usr/local/cuda

RUN APT_INSTALL="apt-get install -y --no-install-recommends" && \
    PIP_INSTALL="python -m pip --no-cache-dir install --upgrade --default-timeout=100" && \
    GIT_CLONE="git clone --depth 10" && \
    TENSORRT_VERSION="6.0.1-1+cuda10.1" && \

    rm -rf /var/lib/apt/lists/* \
           /etc/apt/sources.list.d/cuda.list \
           /etc/apt/sources.list.d/nvidia-ml.list && \

    apt-get update --fix-missing && \

# ==================================================================
# tools
# ------------------------------------------------------------------

    DEBIAN_FRONTEND=noninteractive $APT_INSTALL \
        build-essential \
        apt-utils \
        ca-certificates \
        cmake \
        wget \
        git \
        vim \
        pigz \
        ffmpeg \
        dbus \
        systemd \
        tzdata \
        python-tk \
        && \

# ==================================================================
# rapidsai
# ------------------------------------------------------------------
    # Install Miniconda
    wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-py37_4.8.3-Linux-x86_64.sh -O ~/miniconda.sh && \
        /bin/bash ~/miniconda.sh -b -p /opt/conda && \
        rm ~/miniconda.sh && \
        ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
        . /opt/conda/etc/profile.d/conda.sh && \
        conda activate base && \
        echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
        echo "conda activate base" >> ~/.bashrc && \

    # RapidsAI for CUDA 10.1
    conda install -y -c rapidsai -c nvidia -c conda-forge \
        -c defaults rapids=0.15 python=3.7 cudatoolkit=10.1 && \

# ==================================================================
# python
# ------------------------------------------------------------------

    DEBIAN_FRONTEND=noninteractive $APT_INSTALL \
        software-properties-common \
        && \
    add-apt-repository ppa:deadsnakes/ppa && \
    apt-get update --fix-missing && \
    wget -O ~/get-pip.py \
        https://bootstrap.pypa.io/get-pip.py && \
    python ~/get-pip.py && \
    $PIP_INSTALL \
        setuptools \
        && \
    $PIP_INSTALL \
        numpy==1.17.* \
        scipy \
        pandas==0.25.3 \
        cloudpickle \
        scikit-learn \
        kiwisolver==1.0.1 \
        matplotlib \
        Cython \
        # python3-tk \
        scikit-image \
        iterative-stratification \
        && \

# ==================================================================
# boost
# ------------------------------------------------------------------

    # wget -O ~/boost.tar.gz https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.gz && \
    # tar -zxf ~/boost.tar.gz -C ~ && \
    # cd ~/boost_* && \
    # ./bootstrap.sh --with-python=python3.7 && \
    # ./b2 install --prefix=/usr/local && \
    DEBIAN_FRONTEND=noninteractive $APT_INSTALL \
        libboost-python-dev \
        && \

# ==================================================================
# jupyter
# ------------------------------------------------------------------

    $PIP_INSTALL \
        jupyter \
        nbconvert==5.4.1 \
        notebook==5.7.9 \
        tornado==5.1.1 \
        yarl==1.4.2 \
        yapf \
        jupyter_contrib_nbextensions \
        jupyter_nbextensions_configurator \
        && \
    jupyter contrib nbextension install --user && \
    jupyter nbextension enable code_prettify/code_prettify && \
    jupyter nbextension enable collapsible_headings/main && \
    jupyter nbextension enable toggle_all_line_numbers/main && \

# ==================================================================
# pytorch
# ------------------------------------------------------------------

    # Python 3.6, CUDA 10.1
    # $PIP_INSTALL \
    #     https://download.pytorch.org/whl/cu101/torch-1.1.0-cp36-cp36m-linux_x86_64.whl \
    #     && \
    # $PIP_INSTALL \
    #     https://download.pytorch.org/whl/cu101/torchvision-0.3.0-cp36-cp36m-linux_x86_64.whl \
    #     && \
    $PIP_INSTALL \
        torch==1.4.0 \
        # torch==1.5.1 \
        torchvision==0.5.0 \
        timm \
        effdet \
        omegaconf \
        ensemble-boxes \
        pycocotools \
        'scikit-optimize[plots]' \
        catalyst \
        torchlibrosa \
        efficientnet_pytorch \
        torch-optimizer \
        pytorch-lightning \
        pytorch-pfn-extras \
        pytorch-tabnet \<commit_msg>Upgrade pytoch to 1.6 for native 16-bit support.<commit_after># ==================================================================
# module list
# ------------------------------------------------------------------
# python        3.7    (apt)
# jupyter       latest (pip)
# pytorch       latest (pip)
# tensorflow    latest (pip)
# keras         latest (pip)
# mxnet         latest (pip)
# gluonts       latest (pip)
# opencv        4.3.0  (git)
# ==================================================================

FROM nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04

ENV CUDA_HOME=/usr/local/cuda

RUN APT_INSTALL="apt-get install -y --no-install-recommends" && \
    PIP_INSTALL="python -m pip --no-cache-dir install --upgrade --default-timeout=100" && \
    GIT_CLONE="git clone --depth 10" && \
    TENSORRT_VERSION="6.0.1-1+cuda10.1" && \

    rm -rf /var/lib/apt/lists/* \
           /etc/apt/sources.list.d/cuda.list \
           /etc/apt/sources.list.d/nvidia-ml.list && \

    apt-get update --fix-missing && \

# ==================================================================
# tools
# ------------------------------------------------------------------

    DEBIAN_FRONTEND=noninteractive $APT_INSTALL \
        build-essential \
        apt-utils \
        ca-certificates \
        cmake \
        wget \
        git \
        vim \
        pigz \
        ffmpeg \
        dbus \
        systemd \
        tzdata \
        python-tk \
        && \

# ==================================================================
# rapidsai
# ------------------------------------------------------------------
    # Install Miniconda
    wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-py37_4.8.3-Linux-x86_64.sh -O ~/miniconda.sh && \
        /bin/bash ~/miniconda.sh -b -p /opt/conda && \
        rm ~/miniconda.sh && \
        ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
        . /opt/conda/etc/profile.d/conda.sh && \
        conda activate base && \
        echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
        echo "conda activate base" >> ~/.bashrc && \

    # RapidsAI for CUDA 10.1
    conda install -y -c rapidsai -c nvidia -c conda-forge \
        -c defaults rapids=0.15 python=3.7 cudatoolkit=10.1 && \

# ==================================================================
# python
# ------------------------------------------------------------------

    DEBIAN_FRONTEND=noninteractive $APT_INSTALL \
        software-properties-common \
        && \
    add-apt-repository ppa:deadsnakes/ppa && \
    apt-get update --fix-missing && \
    wget -O ~/get-pip.py \
        https://bootstrap.pypa.io/get-pip.py && \
    python ~/get-pip.py && \
    $PIP_INSTALL \
        setuptools \
        && \
    $PIP_INSTALL \
        numpy==1.17.* \
        scipy \
        pandas==0.25.3 \
        cloudpickle \
        scikit-learn \
        kiwisolver==1.0.1 \
        matplotlib \
        Cython \
        # python3-tk \
        scikit-image \
        iterative-stratification \
        && \

# ==================================================================
# boost
# ------------------------------------------------------------------

    # wget -O ~/boost.tar.gz https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.gz && \
    # tar -zxf ~/boost.tar.gz -C ~ && \
    # cd ~/boost_* && \
    # ./bootstrap.sh --with-python=python3.7 && \
    # ./b2 install --prefix=/usr/local && \
    DEBIAN_FRONTEND=noninteractive $APT_INSTALL \
        libboost-python-dev \
        && \

# ==================================================================
# jupyter
# ------------------------------------------------------------------

    $PIP_INSTALL \
        jupyter \
        nbconvert==5.4.1 \
        notebook==5.7.9 \
        tornado==5.1.1 \
        yarl==1.4.2 \
        yapf \
        jupyter_contrib_nbextensions \
        jupyter_nbextensions_configurator \
        && \
    jupyter contrib nbextension install --user && \
    jupyter nbextension enable code_prettify/code_prettify && \
    jupyter nbextension enable collapsible_headings/main && \
    jupyter nbextension enable toggle_all_line_numbers/main && \

# ==================================================================
# pytorch
# ------------------------------------------------------------------

    # Python 3.6, CUDA 10.1
    # $PIP_INSTALL \
    #     https://download.pytorch.org/whl/cu101/torch-1.1.0-cp36-cp36m-linux_x86_64.whl \
    #     && \
    # $PIP_INSTALL \
    #     https://download.pytorch.org/whl/cu101/torchvision-0.3.0-cp36-cp36m-linux_x86_64.whl \
    #     && \
    $PIP_INSTALL \
        # torch==1.4.0 \
        torch==1.5.1 \
        # torchvision==0.5.0 \
        torchvision==0.6.1 \
        timm \
        effdet \
        omegaconf \
        ensemble-boxes \
        pycocotools \
        'scikit-optimize[plots]' \
        catalyst \
        torchlibrosa \
        efficientnet_pytorch \
        torch-optimizer \
        pytorch-lightning \
        pytorch-pfn-extras \
        pytorch-tabnet \
        && \

    $PIP_INSTALL \
        torch==1.6.0+cu101 \
        torchvision==0.7.0+cu101 \
        -f https://download.pytorch.org/whl/torch_stable.html \
{'fraction_non_alphanumeric': 0.31073832049156347, 'fraction_numerical': 0.025651028967131572, 'mean_word_length': 1.4708433734939759, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 11, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '475832', 'n_tokens_mistral': 3465, 'n_tokens_neox': 3247, 'n_words': 457}