FROM centos:7
LABEL noffuy <3330072-noffuy@users.noreply.gitlab.com>
RUN yum install -y bzip2 bzip2-devel gcc gcc-c++ git make wget curl openssl-devel readline-devel zlib-devel unzip vim libSM-devel libSM libXrender libXrender-devel libXext libXext-devel \
&& wget "https://github.com/pyenv/pyenv/archive/v1.2.8.zip" -O /pyenv.zip \
&& unzip /pyenv.zip \
&& rm /pyenv.zip \
&& mv /pyenv-1.2.8 /pyenv \
&& echo 'export PYENV_ROOT="/pyenv"' >> /etc/bashrc \
&& echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> /etc/bashrc \
&& echo 'eval "$(pyenv init -)"' >> /etc/bashrc \
&& source /etc/bashrc \
&& export PYENV_ROOT="/pyenv" && export PATH="$PYENV_ROOT/bin:$PATH" && eval "$(pyenv init -)" \
&& pyenv install anaconda3-4.3.0 \
&& pyenv rehash \
&& pyenv global anaconda3-4.3.0 \
&& echo 'export PATH="$PYENV_ROOT/versions/anaconda3-4.3.0/bin/:$PATH"' >> /etc/bashrc \
&& source /etc/bashrc \
&& export PATH="$PYENV_ROOT/versions/anaconda3-4.3.0/bin/:$PATH" \
&& conda update conda \
&& conda create -n tensorflow python=3.6.0 \
&& source activate tensorflow \
&& export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.1-cp36-cp36m-linux_x86_64.whl \
&& pip install --ignore-installed --upgrade $TF_BINARY_URL\
&& pip install Cython opencv-python numpy pillow \
&& git clone https://github.com/thtrieu/darkflow.git && cd darkflow && pip install -e .
RUN mkdir /app
ENV LANG ja_JP.UTF-8
ENV LC_CTYPE "ja_JP.UTF-8"
ENV LC_NUMERIC "ja_JP.UTF-8"
ENV LC_TIME "ja_JP.UTF-8"
ENV LC_COLLATE "ja_JP.UTF-8"
ENV LC_MONETARY "ja_JP.UTF-8"
ENV LC_MESSAGES "ja_JP.UTF-8"
ENV LC_PAPER "ja_JP.UTF-8"
ENV LC_NAME "ja_JP.UTF-8"
ENV LC_ADDRESS "ja_JP.UTF-8"
ENV LC_TELEPHONE "ja_JP.UTF-8"
ENV LC_MEASUREMENT "ja_JP.UTF-8"
ENV LC_IDENTIFICATION "ja_JP.UTF-8"
WORKDIR /app