forked from nsidc/qgreenland
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (30 loc) · 1.35 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
# NOTE: We do not use this version of Luigi, because a Docker image isn't
# available for our desired version. `environment.yml` specifies the actual
# version we use.
FROM axiom/docker-luigi:2.8.13
# `libgl1-mesa-glx` is required for qgis to work
# `unrar` is required for layer pipelines
# `git` is required for analyzing the current version
RUN apt-get update
RUN apt-get install -y libgl1-mesa-glx \
unrar \
git
# TODO install to `qgreenland` specific environment. Activate in Dockerfile if
# possible.
COPY environment-lock.yml .
RUN conda env update --file environment-lock.yml --name base
# Create a dedicated env for shelling out to gdal
COPY environment.gdal.yml .
RUN conda env create --file environment.gdal.yml
# Use this method to install to non-root? Need to edit luigid.sh...
# COPY environment.yml .
# RUN conda env create
# ENV PATH="/something/bin:$PATH"
# It's probably better to use the `conda run` method if we're editing luigid.sh
# anyway.
WORKDIR /luigi
# Everything is installed to the base conda environment, but the docker image
# doesn't activate the env automatically, which is how the PYTHONPATH normally
# gets populated. Additionally, /luigi/tasks is where we expect python code to
# be mounted.
ENV PYTHONPATH /luigi/tasks/qgreenland:/opt/conda/share/qgis/python/plugins:/opt/conda/share/qgis/python