Skip to content

Commit

Permalink
Per #527, switch to using dtcenter/met-base-metviewer:v3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnHalleyGotway committed Jul 3, 2024
1 parent b20c08d commit f3a196c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 91 deletions.
7 changes: 1 addition & 6 deletions internal/scripts/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -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}
Expand Down Expand Up @@ -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
#
Expand Down
7 changes: 1 addition & 6 deletions internal/scripts/docker/Dockerfile.copy
Original file line number Diff line number Diff line change
@@ -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}
Expand Down Expand Up @@ -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
#
Expand Down
80 changes: 1 addition & 79 deletions internal/scripts/docker/build_metviewer_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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!"
Expand All @@ -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
Expand Down Expand Up @@ -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 \
Expand Down

0 comments on commit f3a196c

Please sign in to comment.