Skip to content
Snippets Groups Projects
Commit 7d26d3ac authored by arl's avatar arl
Browse files

initial commit

parent 3a8a0c37
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
MITgcmP=$(pwd)/MITgcm-git
while getopts d:khai option
do
case "${option}"
in
d) DATADIR=${OPTARG};;
k) KEEP=1;;
h) HELP=1;;
a) ARCHITECTURE=${OPTARG};;
i) INSTALL=1;;
esac
done
if [ ! -z "$HELP" ] || [ -z "$DATADIR" ]; then
echo -e "\nOPTIONS:\n -d dir \tlocation of computing data (mandatory)\n -i\t\tinstall required packages\n -k\t\tkeep binary files\n -a\t\tarchitecture [amd64(default), ia32]\n -h\t\thelp "
exit 0
fi
if [[ ! "$DATADIR" = /* ]]; then
DATADIR=$(pwd)/$DATADIR
fi
if [ -z "$ARCHITECTURE" ]; then
ARCHITECTURE=amd64
fi
if [ ! -z "$INSTALL" ]; then
sudo apt-get -y update
sudo apt-get -y install build-essential git gfortran python python3
fi
git clone https://github.com/MITgcm/MITgcm.git $MITgcmP
cd $DATADIR/build
rm Makefile -rf
$MITgcmP/tools/genmake2 -mods ../code -of $MITgcmP/tools/build_options/linux_${ARCHITECTURE}_gfortran -rootdir $MITgcmP
make depend
make
cd $DATADIR/run
ln -s ../input/* .
ln -s ../build/mitgcmuv .
./mitgcmuv > output.txt
if [ -z $KEEP ]; then
rm $MITgcmP -rf
fi
FROM mitgcm/testreport-images:ubuntu_18_04_villon
RUN git clone https://github.com/MITgcm/MITgcm.git /MITgcm
COPY build.sh /MITgcm
CMD cd /data; /MITgcm/build.sh
#!/bin/sh
cd /data/build
/MITgcm/tools/genmake2 -mods ../code -of /MITgcm/tools/build_options/linux_amd64_gfortran -rootdir /MITgcm
make depend
make
cd /data/run
ln -s ../input/* .
ln -s ../build/mitgcmuv .
./mitgcmuv > output.txt
version: "2"
services:
mitgcm:
build:
context: .
dockerfile: Dockerfile
container_name: mitgcm-runner
# environment:
# - MITGCM_EXP=tutorial_barotropic_gyre
# - MITGCM_PRECS="16 16"
volumes:
- ../data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment