This page contains a guide for building and using OpenIFS 48r1 at model version 48R1.1 in a linux based container using Docker.
...
Code Block | ||||
---|---|---|---|---|
| ||||
wget https://sites.ecmwf.int/openifs/openifs-data/scm/48r1/scm_openifs_48r1.1.tar.gz tar -xzvf scm_openifs_48r1.1.tar.gz |
Once OpenIFS 48r1 has been extracted to your <openifs-docker-build-dir>
, then copy the Dockerfile
from the release to <openifs-docker-build-dir>
Code Block | ||||
---|---|---|---|---|
| ||||
cp <openifs-docker-build-dir>/openifs-48r1.1/scripts/docker/gcc-docker-48r1.1/Dockerfile <openifs-docker-build-dir>/. |
This cp
step is important because the Dockerfile
and the OpenIFS release and SCM package, i.e., openifs-48r1 .1 and scm_openifs
, need to be in the same directory to build the container.
...
Code Block | ||||
---|---|---|---|---|
| ||||
docker build --tag "openifs-48r1.1" . |
Note the trailing '.' to build in the current dir, which is required.
...
Once these repository packages and the python librarie are installed, open-mpi
is downloaded and built. Then the openifs
user is created and the openifs-48r1.1
directory is copied to the image.
...
Note | |||||||
---|---|---|---|---|---|---|---|
|
...
Code Block | ||||
---|---|---|---|---|
| ||||
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
openifs-48r1.1 latest f72ea92f010f 5 hours ago 2.15GB |
...
Code Block | ||||
---|---|---|---|---|
| ||||
docker run -it 'openifs-48r1.1' |
This command will open an interactive session in the new container, in which the entry directory is the openifs-48r1 .1 directory, e.g.
Code Block | ||||
---|---|---|---|---|
| ||||
docker run -it 'openifs-48r1.1' OpenIFS environment variables are: ------------------------------------------------------ OIFS_ARCH=./arch/ecmwf/hpc2020 OIFS_CYCLE=48r1 OIFS_DATA_DIR=/perm/openifs/oifs_data/48r1/48r1 OIFS_EXEC=/home/openifs/openifs-48r1.1/build/bin/ifsMASTER.DP OIFS_EXPT=/home/openifs/openifs-expt OIFS_HOME=/home/openifs/openifs-48r1.1 OIFS_LOGFILE=/home/openifs/openifs-48r1.1/oifs_test_log.txt OIFS_RUN_SCRIPT=/home/openifs/openifs-48r1.1/scripts/exp_3d OIFS_TEST=/home/openifs/openifs-48r1.1/scripts/build_test SCM environment variables are: ------------------------------------------------------ SCM_EXEC=/home/openifs/openifs-48r1.1/build/bin/MASTER_scm.DP SCM_LOGFILE=/home/openifs/openifs-expt/scm_openifs/48r1/scm-projects/ref48r1/scm_run_log.txt SCM_PROJDIR=/home/openifs/openifs-expt/scm_openifs/48r1/scm-projects SCM_RUNDIR=/home/openifs/openifs-expt/scm_openifs/48r1/scm-projects/ref48r1 SCM_TEST=/home/openifs/openifs-48r1.1/scripts/scm SCM_VERSIONDIR=/home/openifs/openifs-expt/scm_openifs/48r1 openifs@d1bd89ccc47f:~/openifs-48r1.1$48r1$ ls CHANGES COPYING NOTICE arch ifs-source oifs-config.edit_me.sh scripts CITE LICENSE README bundle.yml ifs-test openifs-bundle |
...
Code Block | ||||
---|---|---|---|---|
| ||||
openifs@d1bd89ccc47f:~/openifs-48r1.1$48r1$ $OIFS_TEST/openifs-test.sh -cbt --arch="" |
...
List running containers
Code Block language bash theme Midnight $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d1bd89ccc47f openifs-48r1.1 "bash" 15 hours ago Up 5 seconds beautiful_pasteur
If no container is running on your system, then only CAPITAL headings are returned with
docker ps
List all containers (running and exited)
Code Block language bash theme Midnight $ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d1bd89ccc47f openifs-48r1.1 "bash" 15 hours ago Exited (0) 4 seconds ago beautiful_pasteur
Notice that the
STATUS
isExited
, rather thanUp
, as in (1)
...
Code Block | ||||
---|---|---|---|---|
| ||||
$ docker start -i <Container ID>
# e.g.
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d1bd89ccc47f openifs-48r1.1 "bash" 15 hours ago Exited (0) 4 seconds ago beautiful_pasteur
$ docker start -i d1bd89ccc47f |
...