# A image for paddle lite mobile cross compile and simulator on android

FROM ubuntu:18.04
MAINTAINER PaddlePaddle Authors <paddle-dev@baidu.com>

RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y --no-install-recommends \
        cmake-curses-gui \
        curl \
        fish \
        gawk \
        gcc \
        g++ \
        git \
        graphviz \
        less \
        make \
        patch \
        python \
        python-pip \
        python-setuptools \
        unzip \
        vim \
        wget \
        openssh-client \
        sshpass

# timezone
RUN DEBIAN_FRONTEND=noninteractive apt install -y tzdata
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/timezone && echo 'Asia/Shanghai' >/etc/timezone
RUN dpkg-reconfigure -f noninteractive tzdata

# for cmake 3.10
RUN curl -O https://mms-res.cdn.bcebos.com/cmake-3.10.3-Linux-x86_64.tar.gz && \
        tar xzf cmake-3.10.3-Linux-x86_64.tar.gz && \
        mv cmake-3.10.3-Linux-x86_64 /opt/cmake-3.10 && \
        mv /usr/bin/cmake /usr/bin/cmake.bak && ln -s /opt/cmake-3.10/bin/cmake /usr/bin/cmake && \
        mv /usr/bin/ccmake /usr/bin/ccmake.bak && ln -s /opt/cmake-3.10/bin/ccmake /usr/bin/ccmake

# for arm linux compile
RUN apt-get install -y --no-install-recommends \
        g++-arm-linux-gnueabi \
        gcc-arm-linux-gnueabi \
        g++-arm-linux-gnueabihf \
        gcc-arm-linux-gnueabihf \
        gcc-aarch64-linux-gnu \
        g++-aarch64-linux-gnu 

# clean
RUN apt-get autoremove -y && apt-get clean
RUN rm -rf /cmake-3.10.3-Linux-x86_64.tar.gz

