diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..68b1b04facfc48eaf268a15802c7438eb128af10 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +FROM lagocollaboration/lago-corsika:77402 + +LABEL maintainer.name="The LAGO ARTI team" +LABEL maintainer.email="lago-docker@lagoproject.net" +ENV LANG=C.UTF-8 +ENV LAGO_ARTI=/opt/arti +ENV wdir="/opt" +WORKDIR ${wdir} + +COPY do_analysis_redcca.sh /opt/arti/analysis/ + +ARG CRK_VERSION="77402" +ARG ARTI_BRANCH="master" +ARG arti_pack="vim gcc gcc-c++ gcc-gfortran screen curl csh make perl perl-Data-Dumper git perl-Switch file unzip bzip2" +# CORSIKA image is based on CENTOS, so we use yum +RUN ["/bin/bash", "-c", "yum -y update \ + && yum -y install $arti_pack \ + && echo export LAGO_CRK=\"/opt/lago-corsika-${CRK_VERSION}/run\" >> ${HOME}/.bashrc \ + && git clone https://github.com/lagoproject/arti.git -b ${ARTI_BRANCH} \ + && cd arti \ + && git checkout dad3e1581f50168b2b53829b4e7a517b6cfa354a \ + && sed -i '628s/F/T/' sims/rain.pl \ + && ./lago-arti.sh \ + && source ${HOME}/.bashrc \ + && make"] + && chmod +x /opt/arti/analysis/do_analysis_redcca.sh +CMD bash diff --git a/do_analysis_redcca.sh b/do_analysis_redcca.sh new file mode 100644 index 0000000000000000000000000000000000000000..048cfd9a2abb8d1fde9b82d0f14ce5889c998d3e --- /dev/null +++ b/do_analysis_redcca.sh @@ -0,0 +1,6 @@ +!#/bin/bash + +for i in DAT??????.bz2; do j=$(echo $i | sed -e 's/.bz2//'); u=$(echo $j | sed -e 's/DAT//'); bzip2 -d -k $i; echo $j | ../../../arti/analysis/lagocrkread | ../../../arti/analysis/analysis -p -v $u; rm $j; done + +bzcat *sec.bz2 | ../../../arti/analysis/showers -a 10 -d 10 -c 5100. -n 1 1 -v salida_apx + diff --git a/do_sims_redcca.sh b/do_sims_redcca.sh new file mode 100644 index 0000000000000000000000000000000000000000..d996a3d27e0b35412b40570b715af36f53d966a6 --- /dev/null +++ b/do_sims_redcca.sh @@ -0,0 +1,29 @@ +!#/bin/bash + +# Parámetros +nombre_contenedor="arti-redcca" +nombre_proyecto="BGA60" + +# Crear imagen +docker build --no-cache --build-arg ARTI_BRANCH="master" -t arti:redcca.1.0 - < Dockerfile + +# Crear e iniciar contenedor +docker run -d -it --name $nombre_contenedor arti:redcca.1.0 + +# Crear archivos de simulación +docker exec --workdir /opt/arti/sims/ $nombre_contenedor ./do_sims.sh -w ../../lago-corsika-77402/run/ -p $nombre_proyecto -v 77402 -u csar -t 360 -m 0.0 -n 90 -r 1 -i 1E6 -s bga -b 5 + +# Ejecutar simulaciones +## *all +for i in {1..6}; do docker exec --workdir /opt/lago-corsika-77402/run/ $nombre_contenedor bash go-$nombre_proyecto-all-0$i.sh;done +## *pr +for i in {1..8}; do docker exec --workdir /opt/lago-corsika-77402/run/ $nombre_contenedor bash go-$nombre_proyecto-pr-$i.sh;done +## he +docker exec --workdir /opt/lago-corsika-77402/run/ $nombre_contenedor bash go-$nombre_proyecto-he.sh + +# Análisis +## Copiar archivo para análisis +docker cp do_analysis_redcca.sh $nombre_contenedor:/opt/lago-corsika-77402/run/$nombre_proyecto +## Realizar análisis +docker exec --workdir /opt/lago-corsika-77402/run/$nombre_proyecto $nombre_contenedor bash do_analysis_redcca.sh +