From f3a196cf962202f0c038169af13b08a12ecf904b Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Wed, 3 Jul 2024 13:20:14 -0600 Subject: [PATCH] Per #527, switch to using dtcenter/met-base-metviewer:v3.2 --- internal/scripts/docker/Dockerfile | 7 +- internal/scripts/docker/Dockerfile.copy | 7 +- .../scripts/docker/build_metviewer_docker.sh | 80 +------------------ 3 files changed, 3 insertions(+), 91 deletions(-) diff --git a/internal/scripts/docker/Dockerfile b/internal/scripts/docker/Dockerfile index cc01d953..c5d99e17 100644 --- a/internal/scripts/docker/Dockerfile +++ b/internal/scripts/docker/Dockerfile @@ -1,4 +1,4 @@ -ARG MET_BASE_REPO=met-base +ARG MET_BASE_REPO=met-base-metviewer ARG MET_BASE_TAG=v3.2 FROM dtcenter/${MET_BASE_REPO}:${MET_BASE_TAG} @@ -31,11 +31,6 @@ RUN echo "Build Argument METVIEWER_GIT_NAME=${METVIEWER_GIT_NAME}" \ && echo "Build Argument METCALCPY_GIT_NAME=${METCALCPY_GIT_NAME}" \ && echo "Build Argument METDATAIO_GIT_NAME=${METDATAIO_GIT_NAME}" -# -# Expose METviewer port -# -EXPOSE 8080 - # # Set env vars # diff --git a/internal/scripts/docker/Dockerfile.copy b/internal/scripts/docker/Dockerfile.copy index 4538354c..4ed866a0 100644 --- a/internal/scripts/docker/Dockerfile.copy +++ b/internal/scripts/docker/Dockerfile.copy @@ -1,4 +1,4 @@ -ARG MET_BASE_REPO=met-base +ARG MET_BASE_REPO=met-base-metviewer ARG MET_BASE_TAG=v3.2 FROM dtcenter/${MET_BASE_REPO}:${MET_BASE_TAG} @@ -34,11 +34,6 @@ RUN echo "Build Argument METVIEWER_GIT_NAME=${METVIEWER_GIT_NAME}" \ && echo "Build Argument METCALCPY_GIT_NAME=${METCALCPY_GIT_NAME}" \ && echo "Build Argument METDATAIO_GIT_NAME=${METDATAIO_GIT_NAME}" -# -# Expose METviewer port -# -EXPOSE 8080 - # # Set env vars # diff --git a/internal/scripts/docker/build_metviewer_docker.sh b/internal/scripts/docker/build_metviewer_docker.sh index 58447d7b..f4046f2b 100755 --- a/internal/scripts/docker/build_metviewer_docker.sh +++ b/internal/scripts/docker/build_metviewer_docker.sh @@ -7,11 +7,6 @@ export METPLOTPY_GIT_URL=https://github.com/dtcenter/METplotpy export METCALCPY_GIT_URL=https://github.com/dtcenter/METcalcpy export METDATAIO_GIT_URL=https://github.com/dtcenter/METdataio -# Software constants -export TOMCAT_MAJOR_VERSION=9 -export TOMCAT_MINOR_VERSION=0.89 -export TOMCAT_VERSION=${TOMCAT_MAJOR_VERSION}.${TOMCAT_MINOR_VERSION} - # Check for required environment variables if [ -z ${CATALINA_HOME+x} ]; then echo "ERROR: \${CATALINA_HOME} is required!" @@ -31,28 +26,7 @@ if [ -z ${METDATAIO_GIT_NAME+x} ]; then fi # Update the OS, as needed -apt update -apt -y upgrade - -# Install required packages -apt -y install ant openjdk-17-jdk r-base mariadb-server ksh - -# Setup default cran repo -echo "r <- getOption('repos'); r['CRAN'] <- 'http://cran.us.r-project.org'; options(repos = r);" > ~/.Rprofile - -# Install required R packages -Rscript -e "install.packages('boot')" -Rscript -e "install.packages('plotrix')" -Rscript -e "install.packages('gsl')" -Rscript -e "install.packages('data.table')" -Rscript -e "install.packages('verification')" - -# Install Tomcat -wget https://archive.apache.org/dist/tomcat/tomcat-${TOMCAT_MAJOR_VERSION}/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz -tar -xvf apache-tomcat-${TOMCAT_VERSION}.tar.gz -rm apache-tomcat*.tar.gz -mv apache-tomcat* ${CATALINA_HOME} -chmod +x ${CATALINA_HOME}/bin/*sh +apt update && apt -y upgrade # Install METplus python components mkdir /METviewer-python @@ -124,58 +98,6 @@ cat mv_prune.sh | \ > mv_prune.sh-DOCKER mv mv_prune.sh-DOCKER mv_prune.sh -# Create links for python3 -ln -sf /usr/local/bin/python3.10 /usr/bin/python3 -ln -sf /usr/bin/python3 /usr/bin/python - -ln -sf /usr/local/bin/pip3.10 /usr/bin/pip3 -ln -sf /usr/bin/pip3 /usr/bin/pip - -# Install GEOS - needed for cartopy -cd /tmp -wget http://download.osgeo.org/geos/geos-3.7.2.tar.bz2 -tar xjf geos-3.7.2.tar.bz2 -cd /tmp/geos-3.7.2 -./configure ; make clean ; make -make install -ldconfig -cd /tmp -rm -r geos-3.7.2.tar.bz2 - -# Install Python packages -pip install cartopy && \ -pip install eofs && \ -pip install imutils==0.5.4 && \ -pip install imageio==2.19.2 && \ -pip install lxml==4.9.1 && \ -pip install matplotlib==3.5.2 && \ -pip install netcdf4==1.6.2 && \ -pip install numpy==1.22.0 && \ -pip install pytest==7.1.2 && \ -pip install metpy==1.3.1 && \ -pip install pyyaml==6.0 && \ -pip install scikit-image==0.19.3 && \ -pip install scikit-learn && \ -pip install scipy==1.11.1 && \ -pip install xarray==2022.3.0 && \ -pip install PyMySQL==1.0.2 && \ -pip install pint==0.19.2 && \ -pip install plotly==5.9.0 && \ -pip install kaleido==0.2.1 && \ -pip install attrs==22.1.0 && \ -pip install exceptiongroup==1.0.4 && \ -pip install iniconfig==1.1.1 && \ -pip install packaging==22.0 && \ -pip install pluggy==1.0.0 && \ -pip install pytz==2022.6 && \ -pip install setuptools==65.5.1 && \ -pip install six==1.16.0 && \ -pip install tomli==2.0.1 && \ -pip install wheel==0.38.1 && \ -pip install python-dateutil==2.8.2 && \ -pip install opencv-python && \ -pip install pandas==1.5.2 - # Remove unneeded scripts rm /METviewer/bin/auto_test.sh \ /METviewer/bin/mv_test.sh \