-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathDockerfile
More file actions
76 lines (68 loc) · 1.79 KB
/
Dockerfile
File metadata and controls
76 lines (68 loc) · 1.79 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# STILT Dockerfile
# Ben Fasoli
#
# Builds docker image for dependency free single-shot cli STILT runs by
# supplying run_stilt.r parameters as command args
#
# docker build -t stilt .
#
# The following mounts are required on call to docker run:
#
# METDIR=/path/to/met/directory
# OUTDIR=/path/to/out/directory
# --mount type=bind,source=$METDIR,destination=/app/met,readonly \
# --mount type=bind,source=$OUTDIR,destination=/app/out/by-id \
#
#
# Example
#
# Fetch example met data for testing
# git clone https://github.com/uataq/stilt-tutorials /tmp/stilt-tutorials
# Create host input/output paths
# METDIR=/tmp/stilt-tutorials/01-wbb/met
# OUTDIR=/tmp/stilt-out
# mkdir -p $METDIR $OUTDIR
# docker run \
# --rm \
# --mount type=bind,source=$METDIR,destination=/app/met,readonly \
# --mount type=bind,source=$OUTDIR,destination=/app/out/by-id \
# stilt \
# r_run_time=2015-12-10T00:00:00Z \
# r_lati=40.5 \
# r_long=-112.0 \
# r_zagl=5 \
# met_path=/app/met \
# met_file_format=%Y%m%d.%H \
# xmn=-112.3 \
# xmx=-111.52 \
# xres=0.01 \
# ymn=40.39 \
# ymx=40.95 \
# yres=0.01
FROM debian:bullseye-slim
WORKDIR /app
ENV TZ UTC
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update -yq \
&& apt-get install -y --no-install-recommends \
build-essential \
git \
libgdal-dev \
libhdf5-serial-dev \
libnetcdf-dev \
libssl-dev \
libxml2-dev \
locales \
netcdf-bin \
procps \
r-base \
r-base-dev \
unzip \
wget \
&& locale-gen en_US.UTF-8 \
&& update-locale
COPY . /app
RUN bash setup 3
RUN Rscript r/dependencies.r
VOLUME ["/app/met", "/app/out"]
ENTRYPOINT ["/app/r/stilt_cli.r", "met_path=/app/met", "output_wd=/app/out"]