forked from Ryan-Riggs/LakeFlow_Confluence
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile_input
More file actions
72 lines (61 loc) · 1.82 KB
/
Copy pathDockerfile_input
File metadata and controls
72 lines (61 loc) · 1.82 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
# Start from python image
FROM python:3.12 AS stage0
# Set working directory
WORKDIR /app
# Install Python build dependencies and Python libraries
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git \
curl \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --upgrade pip setuptools \
&& pip install -r requirements.txt \
&& pip install zarr==2.18.2
# Install system libraries for R and geospatial packages
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libgdal-dev \
gdal-bin \
libgeos-dev \
libproj-dev \
default-libmysqlclient-dev \
libudunits2-dev \
libssl-dev \
libxml2-dev \
libcurl4-openssl-dev \
cmake \
libprotobuf-dev \
protobuf-compiler \
locales \
&& echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
&& locale-gen \
&& rm -rf /var/lib/apt/lists/*
ENV LANG=en_US.UTF-8 \
LC_ALL=en_US.UTF-8
# Add docker user and set up R library folder
RUN useradd -s /bin/bash -m docker \
&& usermod -a -G staff docker \
&& mkdir -p /usr/local/lib/R/site-library \
&& chown root:staff /usr/local/lib/R/site-library \
&& chmod g+ws /usr/local/lib/R/site-library
# Install R and basic R packages
RUN apt-get update && apt-get install -y --no-install-recommends \
littler \
r-base \
r-base-dev \
r-recommended \
r-cran-docopt \
&& rm -rf /var/lib/apt/lists/*
# Install R package dependencies
COPY requirements.R .
RUN Rscript requirements.R
FROM stage0 AS stage1
#move all the scripts needed
COPY /src/lakeflow_1.R .
RUN mkdir ./src
COPY /src/geoglows_aws_pull.py ./src
LABEL version="1.0" \
description="Containerized lakeflow module." \
"algorithm.contact"="??"
ENTRYPOINT [ "/usr/bin/Rscript", "/app/lakeflow_1.R" ]