geoarray_ci.docker 2.38 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
FROM centos:7
RUN yum update -y && \
    yum install -y wget vim bzip2 gcc gcc-c++ make libgl1-mesa-glx mesa-libGL qt5-qtbase-gui git # TODO

ENV anaconda_dl 'Anaconda3-4.3.1-Linux-x86_64.sh'
RUN /bin/bash -i -c "cd /root; wget https://repo.continuum.io/archive/$anaconda_dl ; \
    bash -i /root/$anaconda_dl -b ; \
    rm -f /root/$anaconda_dl"

# 'conda install --yes -c conda-forge 'icu=58.*' lxml' fixing a bug for conda-forge gdal build, as of 06/2017
RUN /bin/bash -i -c "source /root/anaconda3/bin/activate ; \
    conda install --yes pyqt coverage ; \
Daniel Scheffler's avatar
Daniel Scheffler committed
13
14
    conda install --yes -c ioam holoviews=1.8.0 ; \
    conda install --yes -c ioam bokeh ; \
15
16
    conda install --yes -c conda-forge gdal ; \
    conda install --yes -c conda-forge 'icu=58.*' lxml ; \
17
    conda install --yes -c conda-forge glymur pygrib rasterio pyproj cachetools basemap; \
18
19
    pip install shapely geopandas pandas dicttoxml jsmin cerberus pyprind pint iso8601 tqdm mpld3 sphinx-argparse \
        folium geojson"
20

Daniel Scheffler's avatar
Daniel Scheffler committed
21
22
23
24
# copy some needed stuff to /root
#COPY *.pkl /root/ # EXAMPLE
#COPY *.h5 /root/  # EXAMPLE

Daniel Scheffler's avatar
Daniel Scheffler committed
25
# copy py_tools_ds code to /tmp # TODO move this to setup.py as soon as package is public
Daniel Scheffler's avatar
Daniel Scheffler committed
26
COPY py_tools_ds /tmp/py_tools_ds
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

# install git lfs
RUN /bin/bash -i -c "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | bash"

# installing git large file support, see here: https://git-lfs.github.com/ , change version number below for future upgrades
ENV git_lfs_v='2.1.1'
RUN /bin/bash -i -c "wget https://github.com/git-lfs/git-lfs/releases/download/v${git_lfs_v}/git-lfs-linux-amd64-${git_lfs_v}.tar.gz; \
    tar -zxvf git-lfs-linux-amd64-${git_lfs_v}.tar.gz; \
    cd git-lfs-${git_lfs_v}; \
    bash ./install.sh"

# set matplotlib backend to Agg as default, Qt won't work in headless docker containers
RUN bash -i -c 'source /root/anaconda3/bin/activate; \
    sed -i "/backend      : tkagg/c\backend      : Agg" $(python -c "import matplotlib; print(matplotlib.matplotlib_fname())"); \
    sed -i "/backend      : Qt4Agg/c\backend      : Agg" $(python -c "import matplotlib; print(matplotlib.matplotlib_fname())"); \
    sed -i "/backend      : qt5agg/c\backend      : Agg" $(python -c "import matplotlib; print(matplotlib.matplotlib_fname())")'


RUN bash -i -c "source /root/anaconda3/bin/activate; \
Daniel Scheffler's avatar
Daniel Scheffler committed
46
    cd /tmp/py_tools_ds/; python setup.py install;"  # TODO move this to setup.py as soon as package is public