Repository navigation
Expand file tree
/
Copy pathDockerfile-github
More file actions
93 lines (75 loc) · 3.21 KB
/
Copy pathDockerfile-github
File metadata and controls
93 lines (75 loc) · 3.21 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
ARG IMAGE_SOURCE
FROM ${IMAGE_SOURCE}ubuntu:22.04 AS systemdependencies
# FROM ubuntu:kinetic AS systemdependencies
LABEL maintainer: "robin.buratti@magellium.fr"
ENV LANG C.UTF-8
ENV LC_ C.UTF-8
RUN ulimit -s unlimited
# Proxy from secret volumes
RUN if [ -f "/kaniko/run/secrets/http_proxy" ]; then export http_proxy=$(cat /kaniko/run/secrets/http_proxy); export https_proxy=$(cat /kaniko/run/secrets/https_proxy); fi && \
apt-get update -y && \
apt-get install -y ca-certificates
RUN update-ca-certificates
# Install libraries
RUN if [ -f "/kaniko/run/secrets/http_proxy" ]; then export http_proxy=$(cat /kaniko/run/secrets/http_proxy); export https_proxy=$(cat /kaniko/run/secrets/https_proxy); fi \
&& apt-get -qq update \
&& DEBIAN_FRONTEND=noninteractive apt-get -qq install -y --no-install-recommends \
software-properties-common \
gcc \
python3.10 \
python3-dev \
build-essential \
gdal-bin \
libgdal-dev \
&& rm -rf /var/lib/apt/lists/*
ENV CPLUS_INCLUDE_PATH=/usr/include/gdal
ENV C_INCLUDE_PATH=/usr/include/gdal
# GRS INSTALL
WORKDIR /home/
COPY ecmwf ./grs2/ecmwf
COPY exe ./grs2/exe
COPY grs ./grs2/grs
COPY grsdata ./grs2/grsdata
COPY pyproject.toml ./grs2/
COPY requirements.txt ./grs2/
WORKDIR /home/grs2
#########################
FROM ${IMAGE_SOURCE}ubuntu:22.04
LABEL maintainer: "robin.buratti@magellium.fr"
ENV LANG C.UTF-8
ENV LC_ C.UTF-8
RUN ulimit -s unlimited
RUN if [ -f "/kaniko/run/secrets/http_proxy" ]; then export http_proxy=$(cat /kaniko/run/secrets/http_proxy); export https_proxy=$(cat /kaniko/run/secrets/https_proxy); fi \
&& apt-get -qq update \
&& DEBIAN_FRONTEND=noninteractive apt-get -qq install -y --no-install-recommends \
python-is-python3 \
python3.10 \
python3-dev \
python3-pip \
python3-affine \
python3-gdal \
python3-lxml \
python3-xmltodict \
gdal-bin \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*
# get GRS from systemdependencies
COPY --from=systemdependencies /home/grs2 /home/grs2
WORKDIR /home/grs2
# Add additionnal dependencies + GRS
RUN if [ -f "/kaniko/run/secrets/http_proxy" ]; then export http_proxy=$(cat /kaniko/run/secrets/http_proxy); export https_proxy=$(cat /kaniko/run/secrets/https_proxy); fi \
&& pip3 install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --upgrade pip \
&& pip3 install \
--trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org \
--no-cache-dir \
-r requirements.txt \
# datashader==0.16.3 (requirements.txt) is incompatible with the dask version
# pip resolves transitively (dask.dataframe.core.DataFrame was removed/moved) —
# same workaround as the python-tests CI job.
&& pip3 install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org \
--no-cache-dir --upgrade datashader \
&& pip3 install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org .
RUN mkdir -p /datalake/watcal/GRS \
&& cp -r grsdata /datalake/watcal/GRS/
WORKDIR /home/
#ENTRYPOINT ["tail", "-f", "/dev/null"]