Skip to content

Commit

Permalink
tweak quakeworx version
Browse files Browse the repository at this point in the history
  • Loading branch information
meihuisu committed Jan 15, 2025
1 parent 7212c55 commit 553ea5f
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 187 deletions.
10 changes: 4 additions & 6 deletions ucvm_v22_7_quakeworx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,10 @@ VOLUME /app/target
WORKDIR /app
COPY examples /app/examples

RUN chmod -R og+rw /app/ucvm /app/examples && \
chmod -R +x /app/examples/*.py /app/examples/*.sh && \
chmod -R og+rw /app/target

# Define directory that will be mounted and used for file input/output
#
# Added steps to manage home directory permissions
RUN chown -R $APP_UID:$APP_GID /app && \
chmod -R og+rw /app/ucvm /app/examples && \
chmod -R +x /app/examples/*.py /app/examples/*.sh

# Add metadata to dockerfile using labels
LABEL org.label-schema.build-date=$BDATE
Expand Down
10 changes: 5 additions & 5 deletions ucvm_v22_7_quakeworx/build_one_quakeworx.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
cmd = "docker tag ucvm_227_%s_quakeworx:%s sceccode/ucvm_227_%s_quakeworx:latest"%(m,mdate,m)
os.system(cmd)

# for m in models:
# print("pushing models: " + m + "with sceccode/ucvm_227_%s_quakeworx:%s" % (m,mdate))
# cmd = "docker push sceccode/ucvm_227_%s_quakeworx:%s" % (m,mdate)
# cmd = "docker push sceccode/ucvm_227_%s_quakeworx:latest" % (m)
# os.system(cmd)
for m in models:
print("pushing models: " + m + " with sceccode/ucvm_227_%s_quakeworx:%s" % (m,mdate))
cmd = "docker push sceccode/ucvm_227_%s_quakeworx:%s" % (m,mdate)
cmd = "docker push sceccode/ucvm_227_%s_quakeworx:latest" % (m)
os.system(cmd)
41 changes: 0 additions & 41 deletions ucvm_v22_7_quakeworx/push_all.py

This file was deleted.

7 changes: 5 additions & 2 deletions ucvm_v22_7_quakeworx/r
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# -rm removes container on exit
# -it indicates inteactive + --tty so that users are at an interactive tty command line when the container starts

docker run -p 8888:8888 --rm -it -e DISPLAY=$DISPLAY --mount type=bind,source="$(pwd)"/target,destination=/home/ucvmuser/target sceccode/ucvm_227_cvmh:0710
#docker run -p 8888:8888 --rm -it --env=DISPLAY --mount type=bind,source="$(pwd)"/target,destination=/home/ucvmuser/target sceccode/ucvm_227_cvmh:0710
docker run -p 8888:8888 --rm -it --mount type=bind,source="$(pwd)"/target,destination=/app/target ucvm_227_cvmh_quakeworx:0115

#docker run -p 8888:8888 --rm -it --mount type=bind,source="$(pwd)"/target,destination=/app/target sceccode/ucvm_227_cvmh_quakeworx:0115

#docker run -p 8888:8888 --rm -it --mount type=bind,source="$(pwd)"/target,destination=/home/ucvmuser/target sceccode/ucvm_227_cvmh:0710
2 changes: 0 additions & 2 deletions ucvm_v22_7_quakeworx/tag_one.sh

This file was deleted.

1 change: 0 additions & 1 deletion ucvm_v22_7_quakeworx/target/basic_query.sh

This file was deleted.

54 changes: 0 additions & 54 deletions ucvm_v22_7_quakeworx/target/plot_script.sh

This file was deleted.

61 changes: 0 additions & 61 deletions ucvm_v22_7_quakeworx/target/plot_vp.py

This file was deleted.

2 changes: 2 additions & 0 deletions ucvm_v22_7_quakeworx/target/run_plot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

plot_horizontal_slice.py -d vs -c cvmh -s 0.011 -a sd -o slice_cvmh.png -i $UCVM_INSTALL_PATH -b 33.585,-118.7904 -u 34.559,-117.5492 -e 1000
2 changes: 2 additions & 0 deletions ucvm_v22_7_quakeworx/target/show_plot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

view_png.py -f slice-cvmh.png
5 changes: 0 additions & 5 deletions ucvm_v22_7_quakeworx/target/test_inputs.txt

This file was deleted.

27 changes: 17 additions & 10 deletions ucvm_v25_2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
FROM rockylinux:8.5
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8

ENV UCVM_TOP_DIR=/app/ucvm
ENV UCVM_DIR=/app/ucvm
ENV PLOTTING_TOP_DIR=/app/plotting
ENV CVM_LARGEDATA_DIR=/app/ucvm/cvm-large-dataset
ENV CVM_TARGET_VOLUME=/app/target
ENV CVM_LARGEDATA_DIR=/app/cvm-large-dataset

# Define Build and runtime arguments
ARG APP_UNAME
Expand Down Expand Up @@ -57,8 +58,9 @@ RUN git clone https://github.com/sceccode/ucvm.git -b withSFCVM src

# An external script has selected the correct model files for this image in the largefiles dir
# by setting the model abbreviations in the largefile_inputs.txt file
WORKDIR /app/ucvm/largefiles
RUN ./get_largefiles.py -m $MODELID && ./stage_largefiles.py
WORKDIR /app/src/largefiles
RUN ./get_largefiles.py -m $MODELID && \
./stage_largefiles.py

WORKDIR /app/src
RUN ./ucvm_setup.py -a -d -p /app/ucvm >& ./ucvm_setup_install.log
Expand All @@ -75,21 +77,26 @@ RUN git clone https://github.com/SCECcode/ucvm_metadata_utilities metadata_utili

WORKDIR /app/plotting
RUN git clone https://github.com/SCECcode/ucvm_plotting.git -b withAnaconda3 && \
cd /app/ucvm/ucvm_plotting && \
cd ucvm_plotting && \
conda install dist/ucvm_plotting-0.0.6.tar.gz

# Define file input/output mounted disk
#
VOLUME /app/target
# /app/target
VOLUME $CVM_TARGET_VOLUME

# Define cvm large dataset mounted disk
# /app/cvm-large-dataset
VOLUME $CVM_LARGEDATA_DIR

# Setup user with test input files
#
WORKDIR /app
COPY examples /app/examples

RUN chmod -R og+rw /app/ucvm /app/examples && \
RUN chmod -R og+rw $UCVM_DIR /app/examples && \
chmod -R +x /app/examples/*.py /app/examples/*.sh && \
chmod -R og+rw /app/target
chmod -R og+rw $CVM_TARGET_VOLUME && \
chmod -R og+r $CVM_LARGEDATA_DIR && \

# Define directory that will be mounted and used for file input/output
#
Expand All @@ -105,7 +112,7 @@ LABEL version="ucvm_v25_2"
USER $APP_UNAME
RUN echo "source /usr/local/opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
echo "source /app/ucvm/conf/ucvm_env.sh" >> ~/.bashrc && \
echo "export CVM_LARGEDATA_DIR=/Users/mei/scec/CVM_DATASET_DIRECTORY" >> ~/.bashrc
echo "export CVM_LARGEDATA_DIR="$CVM_LARGEDATA_DIR >> ~/.bashrc

SHELL ["/bin/bash", "--login", "-c"]
WORKDIR /app/target
Expand Down

0 comments on commit 553ea5f

Please sign in to comment.