Skip to content

Commit

Permalink
Merge pull request #1602 from dassaniansh/dockerscript
Browse files Browse the repository at this point in the history
Dockerfile Updated
  • Loading branch information
henrykironde committed Jul 6, 2021
2 parents 6c59641 + 131463c commit f5b30aa
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,40 @@ RUN apt-get update && apt-get install -y --no-install-recommends apt-utils
# Manually install tzdata to allow for non-interactive install
RUN apt-get install -y --force-yes tzdata

RUN apt-get install -y --force-yes build-essential wget git locales locales-all > /dev/null
RUN apt-get install -y --force-yes postgresql-client mariadb-client > /dev/null
RUN apt-get install -y --force-yes libpq-dev
RUN apt-get install -y --force-yes build-essential wget git locales locales-all > /dev/null &&\
apt-get install -y --force-yes postgresql-client mariadb-client > /dev/null &&\
apt-get install -y --force-yes libpq-dev

# Set encoding
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8

# Remove python2 and install python3
RUN apt-get remove -y python && apt-get install -y python3 python3-pip curl
RUN rm -f /usr/bin/python && ln -s /usr/bin/python3 /usr/bin/python
RUN rm -f /usr/bin/pip && ln -s /usr/bin/pip3 /usr/bin/pip
RUN apt-get remove -y python && apt-get install -y python3 python3-pip curl &&\
rm -f /usr/bin/python && ln -s /usr/bin/python3 /usr/bin/python &&\
rm -f /usr/bin/pip && ln -s /usr/bin/pip3 /usr/bin/pip

RUN echo "export PATH="/usr/bin/python:$PATH"" >> ~/.profile
RUN echo "export PYTHONPATH="/usr/bin/python:$PYTHONPATH"" >> ~/.profile
RUN echo "export PGPASSFILE="~/.pgpass"" >> ~/.profile
RUN echo "export PATH="/usr/bin/python:$PATH"" >> ~/.profile &&\
echo "export PYTHONPATH="/usr/bin/python:$PYTHONPATH"" >> ~/.profile &&\
echo "export PGPASSFILE="~/.pgpass"" >> ~/.profile

# Add permissions to config files
RUN chmod 0644 ~/.profile

RUN pip install pymysql
RUN pip install psycopg2-binary -U
RUN pip install codecov -U
RUN pip install pytest-cov -U
RUN pip install pytest-xdist -U
RUN pip install pytest
RUN pip install yapf
RUN pip install pylint
RUN pip install flake8 -U
RUN pip install h5py
RUN pip install Pillow
RUN pip install kaggle
RUN pip install inquirer
RUN pip install pymysql &&\
pip install psycopg2-binary -U &&\
pip install codecov -U &&\
pip install pytest-cov -U &&\
pip install pytest-xdist -U &&\
pip install pytest &&\
pip install yapf &&\
pip install pylint &&\
pip install flake8 -U &&\
pip install h5py &&\
pip install Pillow &&\
pip install kaggle &&\
pip install inquirer

# Install Postgis after Python is setup
RUN apt-get install -y --force-yes postgis
Expand All @@ -56,8 +56,8 @@ WORKDIR ./retriever
RUN pip install -e .
# Add permissions to config files
# Do not run these cmds before Entrypoint.
RUN export PGPASSFILE="~/.pgpass"
RUN chmod 600 cli_tools/.pgpass
RUN chmod 600 cli_tools/.my.cnf
RUN export PGPASSFILE="~/.pgpass" &&\
chmod 600 cli_tools/.pgpass &&\
chmod 600 cli_tools/.my.cnf

CMD ["bash", "-c", "python --version"]

0 comments on commit f5b30aa

Please sign in to comment.