forked from ec-jrc/lisflood-code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (28 loc) · 953 Bytes
/
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
# docker build -t efas/lisflood .
# docker push efas/lisflood
FROM continuumio/miniconda3
MAINTAINER Domenico Nappo <[email protected]>
ENV DEBIAN_FRONTEND=noninteractive
# Create conda "lisflood" environment:
COPY environment.yml .
RUN conda env create -f environment.yml
RUN conda install -n lisflood -c conda-forge GDAL==`conda run -n lisflood gdal-config --version`
# Install requirements
COPY requirements.txt /
RUN conda run -n lisflood pip install -r /requirements.txt
# Copy source code
WORKDIR /
COPY src/lisflood/. /lisflood/
COPY src/lisf1.py /
COPY src/settings_tpl.xml /
COPY LICENSE /
# Compile kwpt
WORKDIR /lisflood/hydrological_modules
RUN conda run -n lisflood python compile_kinematic_wave_parallel_tools.py build_ext --inplace
# RUN Tests
WORKDIR /
COPY tests/. /tests/
COPY pytest.ini /tests
RUN conda run -n lisflood python -m pytest /tests -x -l -ra
COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]