Commit 882a1845 authored by Ronan Trepos's avatar Ronan Trepos
Browse files

remove docker and galaxy tool

There are now parts of RECORD repository
parent 7dc23b27
## build the docker image
docker build -t rtrepos/azodyn_pea:test container
## list images
docker images
## run image
docker run rtrepos/azodyn_pea:test ls
docker run -it rtrepos/azodyn_pea:test R #ouvre session R
### push image on docker hub
docker login
# pusher pour la production
docker push rtrepos/azodyn_pea:prod
#pusher pour les test (avec planemo)
docker push rtrepos/azodyn_pea:test
## run image with climate outside
cp ../AZODYN/data/Breteniere_1991_2018.csv Breteniere_1991_2018_test.csv
docker run -v $PWD:/work rtrepos/azodyn_pea /bin/bash -c "Rscript --verbose /data/azodyn/siwaa_recipe/razodyn.R /work/file_input.csv /work/file_output.csv 3 > razodyn.txt"
# with singularity
cp ../AZODYN/data/Breteniere_1991_2018.csv Breteniere_1991_2018_test.csv
singularity exec --cleanenv -B $PWD:/work docker://rtrepos/azodyn_pea:prod /bin/bash -c "Rscript --verbose /data/azodyn/siwaa_recipe/razodyn.R /work/file_input.csv /work/file_output.csv 3 > /work/razodyn.txt"
# with singularity without mounted PWD
singularity exec docker://rtrepos/azodyn_pea:test /bin/bash -c "Rscript --verbose /data/azodyn/siwaa_recipe/razodyn.R file_input.csv file_output.csv 5"
cd galaxy_tools ;
planemo serve --job_config_file ../job_conf.xml tools_AZODYN.xml
## publish on toolshed
planemo shed_create --shed_target "" --shed_email "" --shed_password "<TODO>"
FROM debian:buster-slim
RUN env \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y \
curl git libexpat1 libexpat1-dev expat libboost-dev make cmake pkg-config g++ asciidoctor ruby-asciidoctor ninja-build libopenmpi-dev libopenmpi3 zip unzip\
&& rm -rf /var/lib/apt/lists/*
RUN git clone \
&& cd vle \
&& git checkout origin/manager -b manager \
&& mkdir build \
&& cd build \
&& ninja \
&& ninja install \
&& vle-2.1 --restart \
&& ctest --output-on-failure \
&& rm -fr build
RUN R --vanilla -e 'install.packages("RUnit", repos="")'
RUN R --vanilla -e 'install.packages("ggplot2", repos="")'
RUN R --vanilla -e 'install.packages("gridExtra", repos="")'
RUN R --vanilla -e 'install.packages("reshape2", repos="")'
RUN git clone \
&& cd rvle \
&& git checkout origin/manager -b manager
RUN tar cfz rvle.tar.gz rvle \
&& rm -rf rvle
RUN R CMD INSTALL rvle.tar.gz
RUN git clone \
&& cd packages \
&& git checkout origin/manager -b manager
RUN cd packages \
&& vle -P vle.reader clean rclean configure build \
&& vle -P vle.tester clean rclean configure build \
&& vle -P vle.discrete-time clean rclean configure build
RUN git clone \
&& cd RECORD \
&& git checkout origin/manager -b manager
RUN cd RECORD/pkgs \
&& vle -P record.meteo clean rclean configure build \
&& vle -P record.meteo_test clean rclean configure build test\
&& vle -P vle.discrete-time.generic clean rclean configure build
RUN git clone \
&& cd azodyn \
&& git checkout origin/siwaa -b siwaa \
&& vle -P AZODYN configure build
RUN chmod -R 755 /data/vle-2001
categories: [AgroEcosystems]
description: AzodynPea experiment plan simulation
name: azodyn_pea
owner: siwaa
<xml name="slurm_task_account">
<section name="slurmadv" title="Advanced Options for Slurm" expanded="false">
<param name="account" type="text" value="record" label="Slurm account name" />
<param name="ntasks" type="integer" value="5" min="5" max="5" label="Slurm number of tasks" />
<xml name="slurm_account">
<section name="slurmadv" title="Advanced Options for Slurm" expanded="false">
<param name="account" type="text" value="record" label="Slurm account name" />
<tool id="AzodynPea" name="AzodynPea experiment plan simulation" version="1.0.0">
<container type="singularity">docker://rtrepos/azodyn_pea:prod</container>
<command detect_errors="aggressive">
unzip ${input_meteo};
/bin/bash -c "Rscript --verbose /data/azodyn/siwaa_recipe/razodyn.R ${file_input} ${file_outputs} 5";
zip azodyn_plot.png azodyn_results_*.txt;
cp ${azodyn_results};
<param name="input_meteo" type="data" format="zip" label="input meteo (zip file)"/>
<param name="file_input" type="data" format="csv" label="azodyn inputs"/>
<param name="file_outputs" type="data" format="csv" label="azodyn outputs"/>
<expand macro="slurm_task_account" />
<data format="zip" name="azodyn_results" />
input meteo zip containing eg:
meteo1.csv and meteo2.csv
AZODYN inputs eg:
AZODYN outputs eg:
<?xml version="1.0"?>
<!-- A sample job config that explicitly configures job running the way it is configured by default (if there is no explicit config). -->
<plugin id="local" type="runner" load="" workers="4"/>
<destination id="local" runner="local">
<param id="singularity_enabled">true</param>
# Rscript --verbose razodyn.R file_input.csv file_output.csv 5 > razodyn.txt
Sys.setenv(VLE_HOME = "/data")
file_define = "file_define.csv";
file_propagate = "file_propagate.csv";
file_replicate = "file_replicate.csv";
file_input = "file_input.csv";
file_output = "file_output.csv";
nbslots = 5
###config from args
file_input = as.character(args[1]);
# # mycond1.myport1;mycond2.myport2;;mycond3.myport3
# 2.5;coucou;4
# 2.6;bye;1
# 2.4;pffff;6
file_output = args[2];
# #id of output, path, integration, aggregation_replicate, aggregation_input, replicate_quantile, time1, obs1, time2, obs2, ...
# myid1;myview/atomic.Port1;"last";"quantile";"all";0.2;123;0.5;138;0.8
nbslots = as.integer(args[3])
f ="AzodynPea.vpz", "AZODYN")
rvle.set_log_level(f, 7);
rvle.manager_set_config(vleObj=f, parallel_option = "cvle", nb_slots = nbslots,
simulation_spawn = F, rm_MPI_files = T,
generate_MPI_host = T, working_dir = getwd());
inputs = rvleExp.parseSim(file_sim=file_input, vleObj=f, skip=0)
rvle.plan_propagate(f, cond="condClimate", port="PkgName", val="")
outs = read.table(file_output, sep=";",header=T, stringsAsFactors=F)
for (i in 1:nrow(outs)) {
rvle.plan_output(vleObj=f, id=outs$id[i], path=outs$path[i],
res = rvle.plan_run(f)
for (i in 1:nrow(outs)) {
write.table(res[[outs$id[i]]], file=paste(sep="", 'azodyn_results_',outs$id[i],'.txt'),
row.names=F, col.names=F, sep=";")
png(filename="azodyn_plot.png", width = 1000, height = 1000)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment