Sign inSign up

dotran/centos6

By dotran

•Updated about 8 years ago

CentOS 6.10 (Final) with Python 3 (+ data science packages) and Vim & Htop compiled from source

Image
0

79

dotran/centos6 repository overview

⁠Dockerfile
FROM centos:6

RUN yum groupinstall -y "Development Tools"
RUN yum install -y \
    gcc gcc-c++ gcc-gfortran make cmake
RUN yum install -y \
    #vim \
    wget xz \
    ncurses ncurses-devel

ENV HOME /root

# Download & compile & install Htop
ENV HTOPDIR $HOME/local/htop
RUN export HTOP_URL="http://hisham.hm/htop/releases/2.2.0/htop-2.2.0.tar.gz" \
    && cd /tmp \
    && wget ${HTOP_URL} \
    && tar -xf htop-* \
    && cd htop-* \
    && ./configure --prefix=${HTOPDIR} \
    && make -j48 \
    && make install \
    && cd - \
    && rm -rf htop-*
ENV PATH ${HTOPDIR}/bin:$PATH

# Prerequisites for compiling Python
RUN yum install -y \
    tk-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel \
    readline-devel gdbm-devel db4-devel libpcap-devel xz-devel expat-devel \
    libffi libffi-devel uuid-devel libuuid-devel libpng-devel

# Download & compile & install Python 3
ENV PYTHONDIR $HOME/local/python
RUN export VERSION="3.6.6" \
    && cd /tmp \
    && rm -rf Python-${VERSION}* \
    && wget https://www.python.org/ftp/python/${VERSION}/Python-${VERSION}.tar.xz \
    && tar -xf Python-${VERSION}.tar.xz \
    && cd Python-${VERSION} \
    #&& ./configure --enable-optimizations --prefix=${PYTHONDIR} \
    && ./configure --prefix=${PYTHONDIR} \
    && make -j48 \
    && make install \
    && cd - \
    && rm -rf Python-${VERSION}*
ENV PATH ${PYTHONDIR}/bin:$PATH

# Install useful packages for Python 3
RUN pip3 install --upgrade \
    pip \
    virtualenv virtualenvwrapper \
    pipenv \
    flask gunicorn django grip selenium beautifulsoup4 \
    numpy xgboost \
    ipython[all] jupyter notebook jupyterlab \
    scipy statsmodels pandas matplotlib seaborn scikit-learn sklearn scikit-image nltk gensim theano tensorflow keras \
    xlrd \
    dask distributed paramiko

# Download & compile & install Python 2
ENV PYTHON2DIR $HOME/local/python2
RUN export VERSION="2.7.15" \
    && cd /tmp \
    && rm -rf Python-${VERSION}* \
    && wget https://www.python.org/ftp/python/${VERSION}/Python-${VERSION}.tar.xz \
    && tar -xf Python-${VERSION}.tar.xz \
    && cd Python-${VERSION} \
    && ./configure --prefix=${PYTHON2DIR} \
    && make -j48 \
    && make install \
    && cd - \
    && rm -rf Python-${VERSION}*

# Prerequisites for compiling Vim
RUN yum install -y \
    ruby ruby-devel \
    lua lua-devel \
    luajit luajit-devel \
    tcl-devel \
    python python-devel \
    #python3 python3-devel \
    perl perl-devel \
    perl-ExtUtils-Embed \
    perl-ExtUtils-ParseXS \
    perl-ExtUtils-XSpp \
    perl-ExtUtils-CBuilder

# Download & compile & install Vim
ENV VIMDIR $HOME/local/vim
RUN cd /tmp \
    && git clone https://github.com/vim/vim.git \
    && cd vim \
    && ./configure --prefix=${VIMDIR} \
            --with-features=huge \
            --enable-multibyte \
            --enable-cscope \
            --enable-gui=auto \
            --enable-tclinterp \
            --enable-luainterp \
            --enable-perlinterp \
            --enable-rubyinterp \
            --enable-pythoninterp \
            --enable-python3interp \
            --with-python-config-dir=${PYTHON2DIR}/lib/python2.7/config \
            --with-python3-config-dir=${PYTHONDIR}/lib/python3.6/config-3.6m-x86_64-linux-gnu \
    && make -j48 VIMRUNTIMEDIR=${VIMDIR}/share/vim/vim81 \
    && make install \
    && cd - \
    && rm -rf vim
ENV PATH ${VIMDIR}/bin:$PATH

#RUN yum install -y redhat-lsb

CMD ["/bin/bash"]

Tag summary

Content type

Image

Digest

Size

979.6 MB

Last updated

about 8 years ago

docker pull dotran/centos6:python-3.6.6