-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
48 lines (36 loc) · 1.2 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
43
44
45
46
47
48
# 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
# Install opendrift
ADD . /code
RUN pip install -e .
# Test installation
RUN /bin/bash -c "echo -e \"import opendrift\" | python"
# Install wget and erddapy
RUN pip install --user -r required.txt
# Add Service Module files
WORKDIR /usr/src/app
COPY ["SM-R1.py", "./"]
COPY ["run.sh", "./"]
COPY ["R1.yaml", "./"]
COPY ["Pilot-*-seafloor-depth.nc", "./"]
COPY ["landmask.*", "./"]
COPY ["*.png", "./"]
COPY ["*.ttf", "./"]
COPY ["required.txt", "./"]
COPY ["bulletin_script.py", "./"]
RUN chmod 755 /usr/src/app/run.sh
# Replace OpenDrift's code with Service Module's code
COPY ["basemodel.py", "/code/opendrift/models/"]
COPY ["reader_netCDF_CF_generic.py", "/code/opendrift/readers/"]
ENTRYPOINT ["/usr/src/app/run.sh"]
# ENTRYPOINT ["bash", "-c"]