forked from OpenDrift/opendrift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (21 loc) · 870 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
# See https://opendrift.github.io for usage
FROM continuumio/miniconda3
ENV DEBIAN_FRONTEND noninteractive
ENV PATH /code/opendrift/opendrift/scripts:$PATH
RUN mkdir /code
WORKDIR /code
RUN conda config --add channels noaa-orr-erd
RUN conda config --add channels conda-forge
RUN conda config --add channels opendrift
# Install opendrift environment into base conda environment
COPY environment.yml .
RUN /opt/conda/bin/conda env update -n base -f environment.yml
# Cache cartopy maps
RUN /bin/bash -c "echo -e \"import cartopy\nfor s in ('c', 'l', 'i', 'h', 'f'): cartopy.io.shapereader.gshhs(s)\" | python"
# Cache landmask generation
RUN /bin/bash -c "echo -e \"import opendrift_landmask_data as old\nold.Landmask()\" | python"
# Install opendrift
ADD . /code
RUN pip install -e .
# Test installation
RUN /bin/bash -c "echo -e \"import opendrift\" | python"