From 7c51d9af6785423ea71d26602fd59d8de604d951 Mon Sep 17 00:00:00 2001
From: meihuisu <mei@usc.edu>
Date: Tue, 14 Jan 2025 12:08:15 -0800
Subject: [PATCH] fix dockerfile

---
 ucvm_v25_2/Dockerfile | 22 +++++++++++-----------
 ucvm_v25_2/build.py   | 10 +++++-----
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/ucvm_v25_2/Dockerfile b/ucvm_v25_2/Dockerfile
index c0410de..032f80d 100644
--- a/ucvm_v25_2/Dockerfile
+++ b/ucvm_v25_2/Dockerfile
@@ -38,11 +38,11 @@ RUN wget --quiet https://repo.anaconda.com/archive/Anaconda3-2024.02-1-Linux-x86
     /bin/bash anaconda.sh -b -p /usr/local/opt/conda && \
     rm anaconda.sh && \
     source /usr/local/opt/conda/bin/activate && \
-    conda init
+    /usr/local/opt/conda/bin/conda init
 
-RUN conda config --add channels conda-forge && \
-    conda install scipy pip numpy matplotlib basemap basemap-data-hires && \
-    conda install conda-forge::gmt setuptools anaconda::pybind11 conda-forge::h5py
+RUN /usr/local/opt/conda/bin/conda config --add channels conda-forge && \
+    /usr/local/opt/conda/bin/conda install scipy pip numpy matplotlib basemap basemap-data-hires && \
+    /usr/local/opt/conda/bin/conda install conda-forge::gmt setuptools anaconda::pybind11 conda-forge::h5py
 
 # Setup Owners
 # Documents say this groupadd is needed when you build on linux, but not on Mac
@@ -69,14 +69,14 @@ RUN CVM_LARGEDATA_DIR="/Users/mei/scec/CVM_DATASET_DIRECTORY" ./ucvm_setup.py -a
 
 # Install plotting libraries
 WORKDIR /app/ucvm
-git clone https://github.com/SCECcode/ucvm_metadata_utilities metadata_utilities
-cd metadata_utilities
-source ./setup.sh
+RUN git clone https://github.com/SCECcode/ucvm_metadata_utilities metadata_utilities && \
+    cd metadata_utilities && \
+    source ./setup.sh
+
 WORKDIR /app/ucvm
-RUN git clone https://github.com/SCECcode/ucvm_plotting.git -b withAnaconda3
-cd /app/ucvm/ucvm_plotting
-RUN ./unpack-dist
-conda install dist/ucvm_plotting-0.0.6.tar.gz
+RUN git clone https://github.com/SCECcode/ucvm_plotting.git -b withAnaconda3 && \
+    cd /app/ucvm/ucvm_plotting && \
+    conda install dist/ucvm_plotting-0.0.6.tar.gz
 
 
 # Define file input/output mounted disk
diff --git a/ucvm_v25_2/build.py b/ucvm_v25_2/build.py
index 8f41932..dfe9689 100755
--- a/ucvm_v25_2/build.py
+++ b/ucvm_v25_2/build.py
@@ -41,8 +41,8 @@
         cmd = "docker tag ucvm_252_%s:%s sceccode/ucvm_252_%s:latest"%(m,mdate,m)
         os.system(cmd)
 
-    for m in models:
-        print("pushing models: " + m + "with sceccode/ucvm_252_%s:%s" % (m,mdate))
-        cmd = "docker push sceccode/ucvm_252_%s:%s" % (m,mdate)
-        cmd = "docker push sceccode/ucvm_252_%s:latest" % (m)
-        os.system(cmd)
+#    for m in models:
+#        print("pushing models: " + m + "with sceccode/ucvm_252_%s:%s" % (m,mdate))
+#        cmd = "docker push sceccode/ucvm_252_%s:%s" % (m,mdate)
+#        cmd = "docker push sceccode/ucvm_252_%s:latest" % (m)
+#        os.system(cmd)