Skip to content

Instantly share code, notes, and snippets.

@jbu jbu/Dockerfile
Last active Aug 29, 2015

What would you like to do?
FROM debian:wheezy
RUN apt-get update && \
apt-get install -y \
gfortran \
ksh \
libnetcdf-dev \
make \
patch \
python-dev \
wget \
vim && \
apt-get clean
RUN cd / && \
tar fxz modelE2_AR5_branch.2015.03.07_01.07.26.tgz && \
rm modelE2_AR5_branch.2015.03.07_01.07.26.tgz && \
mv modelE2_AR5_branch modelE && \
chown -R root:root modelE
RUN mkdir /runs && \
cd /runs && \
wget -i
ADD /modelE/
RUN chmod +x /modelE/
# get docker machine
docker-machine create --driver virtualbox modele
$(docker-machine env modele)
docker-machine start modele
docker $(docker-machine config modele) build -t modele
docker $(docker-machine config modele) run -it modele bash
docker-machine stop modele
docker-machine rm modele
export PATH=.:$PATH
cd decks
export COMPILER=gfortran
mkdir /runs/decks
mkdir /runs/output
make config
cat /root/.modelErc |
sed 's/^\(DECKS_REPOSITORY=\).*/\1\/runs\/decks/g'|
sed 's/^\(CMRUNDIR=\).*/\1\/runs/g' |
sed 's/^\(GCMSEARCHPATH=\).*/\1\/runs/g' |
sed 's/^\(EXECDIR=\).*/\1\/modelE\/exec/g' |
sed 's/^\(NETCDFHOME=\).*/\1\/usr/g' |
sed 's/^\(SAVEDISK=\).*/\1\/runs\/output/g' > o && mv o /root/.modelErc
sed 's/-lnetcdf$/&f/g' < /modelE/config/ > o && mv o /modelE/config/
make rundeck RUN=my_run
sed 's/YEARE=1949/YEARE=1950/g' < /modelE/decks/my_run.R > o && mv o /modelE/decks/my_run.R
make gcm RUN=my_run
make setup RUN=my_run
#make aux RUN=my_run
../exec/runE my_run
#../exec/pdE my_run JAN1987.accmy_run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.