Created
January 18, 2023 19:40
-
-
Save Synkevych/e69437e4e78b4e7bfe66e0964137b60a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM --platform=linux/amd64 ubuntu:18.04 | |
LABEL maintainer Synkevych Roman "[email protected]" | |
RUN apt-get update && apt-get install -y \ | |
language-pack-en openssh-server vim software-properties-common \ | |
build-essential make gcc g++ zlib1g-dev git python3 python3-dev python3-pip \ | |
gfortran autoconf libtool automake flex bison cmake git-core \ | |
libeccodes0 libeccodes-data libeccodes-dev libeccodes-tools \ | |
libnetcdff-dev unzip curl wget | |
# did't work on ARM64 arch | |
RUN add-apt-repository 'deb http://security.ubuntu.com/ubuntu xenial-security main'\ | |
&& apt-get update \ | |
&& apt-key adv --refresh-keys --keyserver keyserver.ubuntu.com \ | |
&& apt-get install -y libjasper1 libjasper-dev | |
# Eneble MPI | |
RUN apt-get -y install openmpi-bin libopenmpi-dev | |
# Download, modify and compile flexpart 10 | |
RUN mkdir flex_src && cd flex_src \ | |
&& wget https://www.flexpart.eu/downloads/66 \ | |
&& tar -xvf 66 \ | |
&& rm 66 \ | |
&& cd flexpart_v10.4_3d7eebf/src \ | |
&& cp makefile makefile_local \ | |
&& sed -i '74 a INCPATH1 = /usr/include\nINCPATH2 = /usr/include\nLIBPATH1 = /usr/lib\n F90 = gfortran' makefile_local \ | |
&& sed -i 's/LIBS = -lgrib_api_f90 -lgrib_api -lm -ljasper $(NCOPT)/LIBS = -leccodes_f90 -leccodes -lm -ljasper $(NCOPT)/' makefile_local \ | |
&& make mpi ncf=yes -f makefile_local | |
ENV PATH /flex_src/flexpart_v10.4_3d7eebf/src/:$PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment