-
Notifications
You must be signed in to change notification settings - Fork 17
/
Dockerfile
42 lines (31 loc) · 1.31 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM ubuntu:18.04
MAINTAINER Weecology "https://github.com/weecology/retriever"
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 > /dev/null
# 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 echo "export PATH="/usr/bin/python:$PATH"" >> ~/.profile
RUN echo "export PYTHONPATH="/usr/bin/python:$PYTHONPATH"" >> ~/.profile
RUN echo "export PGPASSFILE="~/.pgpass"" >> ~/.profile
# Add permissions to config files
RUN chmod 0644 ~/.profile
# Install requirements
RUN pip3 install psycopg2-binary
RUN pip3 install pytest
RUN pip3 install h5py
RUN pip3 install Pillow
RUN pip3 install kaggle
RUN pip3 install git+https://[email protected]/weecology/retriever.git
# Install Postgis after Python is setup
RUN apt-get install -y --force-yes postgis
COPY . ~/recipes
WORKDIR ~/recipes