forked from SWOT-Confluence/Validation
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (23 loc) · 949 Bytes
/
Copy pathDockerfile
File metadata and controls
27 lines (23 loc) · 949 Bytes
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
# Stage 0 - Create from Python3.12 image
FROM python:3.12-slim as stage0
# Stage 1 - Debian dependencies
FROM stage0 as stage1
RUN apt update \
&& DEBIAN_FRONTEND=noninteractive apt install -y curl zip python3-dev build-essential libhdf5-serial-dev netcdf-bin libnetcdf-dev
# Stage 2 - Create virtual environment and install dependencies
FROM stage1 as stage2
COPY requirements.txt /app/requirements.txt
RUN /usr/local/bin/python3 -m venv /app/env
RUN /app/env/bin/pip install -r /app/requirements.txt
# Stage 3 - Copy Validation code
FROM stage2 as stage3
COPY ./val /app/val/
COPY ./sos_read /app/sos_read/
# Stage 4 - Execute algorithm
FROM stage3 as stage4
COPY validation_confluence.py /app/validation_confluence.py
LABEL version="1.0" \
description="Containerized MOI algorithm." \
"confluence.contact"="ntebaldi@umass.edu" \
"algorithm.contact"="coss.31@osu.edu"
ENTRYPOINT ["/app/env/bin/python3", "/app/validation_confluence.py"]