Skip to content

Commit

Permalink
Reverted python
Browse files Browse the repository at this point in the history
  • Loading branch information
axsaucedo authored and seldondev committed Jul 20, 2020
1 parent f57b7fe commit ab3bc2f
Showing 1 changed file with 27 additions and 19 deletions.
46 changes: 27 additions & 19 deletions core-builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,27 +60,35 @@ ENV MAVEN_CONFIG="$USER_HOME_DIR/.m2"
# compression and ssl libs required for installation python and dependencies (pandas)
RUN apt-get upgrade && \
apt-get update && \
apt-get dist-upgrade -y && \
apt-get install libncursesw5-dev libgdbm-dev libc6-dev -y && \
apt-get install zlib1g -y && \
apt-get install zlib1g-dev libsqlite3-dev tk-dev -y && \
apt-get install openssl libssl-dev -y && \
apt-get install zlib1g-dev -y && \
apt-get install libssl-dev -y && \
apt-get install libbz2-dev -y && \
apt-get install liblzma-dev -y && \
apt-get install libffi-dev -y

ENV CONDA_VERSION=4.7.12

RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-${CONDA_VERSION}-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh && \
/opt/conda/bin/conda clean -tipsy && \
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
echo "conda activate base" >> ~/.bashrc && \
find /opt/conda/ -follow -type f -name '*.a' -delete && \
find /opt/conda/ -follow -type f -name '*.js.map' -delete && \
/opt/conda/bin/conda clean -afy
apt-get install liblzma-dev -y

RUN curl -SLO https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz \
&& tar xvf Python-${PYTHON_VERSION}.tgz \
&& cd Python-${PYTHON_VERSION} \
&& ./configure --prefix=/usr/local --with-openssl \
&& make \
&& make altinstall \
&& cd / \
&& rm -rf Python-${PYTHON_VERSION}* \
&& (cd /usr/local/bin && ln -svn python3.6 python)

# Ensure python3 and pip3 are default
RUN curl -sS https://bootstrap.pypa.io/get-pip.py >>setup.py && \
python setup.py
RUN update-alternatives --install /usr/bin/python python /usr/local/bin/python3.6 1
RUN rm -rf /usr/local/bin/pip && \
ln -s /usr/local/bin/pip3.6 /usr/local/bin/pip

RUN pip install --upgrade pip
RUN pip install --upgrade setuptools
RUN pip install pyyaml
RUN pip install grpcio
RUN pip install grpcio-tools
RUN apt-get remove -y --auto-remove && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# INSTALL GO
ENV GO_VERSION=1.14.6
Expand Down

0 comments on commit ab3bc2f

Please sign in to comment.