5
5
# Fabian Lehmann
6
6
# Wilfried Weber
7
7
8
- FROM ubuntu:20 .04 AS builder
8
+ FROM ubuntu:24 .04 AS builder
9
9
10
10
# disable interactive frontends
11
11
ENV DEBIAN_FRONTEND=noninteractive
@@ -54,29 +54,23 @@ apt-get -y install \
54
54
libglpk-dev \
55
55
libavcodec-dev \
56
56
libavformat-dev \
57
+ libopencv-dev \
57
58
libswscale-dev \
58
- python3.8 \
59
+ python3.12 \
59
60
python3-pip \
61
+ python-is-python3 \
60
62
pandoc \
63
+ parallel \
61
64
libudunits2-dev \
62
65
r-base \
63
66
aria2 && \
64
- dpkg -r parallel && \
65
- wget http://de.archive.ubuntu.com/ubuntu/pool/universe/p/parallel/parallel_20210822+ds-2_all.deb && \
66
- dpkg -i parallel_20210822+ds-2_all.deb && \
67
- rm parallel_20210822+ds-2_all.deb && \
68
- # Set python aliases for Python 3.x
69
- echo 'alias python=python3' >> ~/.bashrc \
70
- && echo 'alias pip=pip3' >> ~/.bashrc \
71
- && . ~/.bashrc && \
72
67
#
73
68
# NumPy is needed for OpenCV, gsutil for level1-csd, landsatlinks for level1-landsat (requires gdal/requests/tqdm)
74
- pip3 install --no-cache-dir --upgrade pip && \
75
- pip3 install --no-cache-dir \
76
- numpy==1.18.1 \
69
+ pip3 install --break-system-packages --no-cache-dir \
70
+ numpy==1.26.4 \
77
71
gsutil \
78
- scipy==1.6.0 \
79
- gdal==$(gdal-config --version | awk -F '[.]' '{print $1"."$2}' ) \
72
+ scipy==1.14.1 \
73
+ gdal==$(gdal-config --version) \
80
74
git+https://github.com/ernstste/landsatlinks.git && \
81
75
#
82
76
# Install R packages
@@ -91,22 +85,12 @@ apt-get clean && rm -r /var/cache/ /root/.cache /tmp/Rtmp*
91
85
92
86
# Install folder
93
87
ENV INSTALL_DIR=/opt/install/src \
94
- HOME=/home/docker \
95
- PATH="$PATH:/home/docker /bin"
88
+ HOME=/home/ubuntu \
89
+ PATH="$PATH:/home/ubuntu /bin"
96
90
97
- # Build OpenCV from source
98
- RUN mkdir -p $INSTALL_DIR/opencv && cd $INSTALL_DIR/opencv && \
99
- wget https://github.com/opencv/opencv/archive/4.1.0.zip \
100
- && unzip 4.1.0.zip && \
101
- mkdir -p $INSTALL_DIR/opencv/opencv-4.1.0/build && \
102
- cd $INSTALL_DIR/opencv/opencv-4.1.0/build && \
103
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local .. \
104
- && make -j7 \
105
- && make install \
106
- && make clean && \
107
91
#
108
92
# Build SPLITS from source
109
- cd $INSTALL_DIR && \
93
+ RUN mkdir -p $INSTALL_DIR && cd $INSTALL_DIR && \
110
94
git clone https://bitbucket.org/smader/splits.git \
111
95
&& cd splits && \
112
96
libtoolize --force \
@@ -123,14 +107,10 @@ libtoolize --force \
123
107
rm -rf $INSTALL_DIR
124
108
# RUN apt-get purge -y --auto-remove apt-utils cmake git build-essential software-properties-common
125
109
110
+ RUN chgrp ubuntu /usr/local/bin && \
111
+ install -d -o ubuntu -g ubuntu -m 755 /home/ubuntu/bin
126
112
127
- # Create a dedicated 'docker' group and user
128
- RUN groupadd docker && \
129
- useradd -m docker -g docker -p docker && \
130
- chmod 0777 /home/docker && \
131
- chgrp docker /usr/local/bin && \
132
- mkdir -p /home/docker/bin && chown docker /home/docker/bin
133
113
# Use this user by default
134
- USER docker
114
+ USER ubuntu
135
115
136
- WORKDIR /home/docker
116
+ WORKDIR /home/ubuntu
0 commit comments