Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
record
azodyn
Commits
882a1845
Commit
882a1845
authored
Jan 12, 2022
by
Ronan Trepos
Browse files
remove docker and galaxy tool
There are now parts of RECORD repository
parent
7dc23b27
Changes
8
Hide whitespace changes
Inline
Side-by-side
siwaa_recipe/README.txt
deleted
100644 → 0
View file @
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"
####planemo
cd galaxy_tools ;
planemo serve --job_config_file ../job_conf.xml tools_AZODYN.xml
## publish on toolshed
planemo shed_create --shed_target "http://147.100.179.176:9009/" --shed_email "siwaa@inra.fr" --shed_password "<TODO>"
siwaa_recipe/container/Dockerfile
deleted
100644 → 0
View file @
7dc23b27
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
\
r-base
\
&&
rm
-rf
/var/lib/apt/lists/
*
ENV
VLE_HOME=/data
WORKDIR
/data
RUN
git clone https://github.com/rtrepos/vle.git
\
&&
cd
vle
\
&&
git checkout origin/manager
-b
manager
\
&&
mkdir
build
\
&&
cd
build
\
&&
cmake
-G
"Ninja"
-DCMAKE_INSTALL_PREFIX
=
/usr
-DCMAKE_BUILD_TYPE
=
RelWithDebInfo
-DWITH_CVLE
=
ON
-DWITH_GVLE
=
OFF ..
\
&&
ninja
\
&&
ninja
install
\
&&
vle-2.1
--restart
\
&&
ctest
--output-on-failure
\
&&
rm
-fr
build
RUN
R
--vanilla
-e
'install.packages("RUnit", repos="http://cran.us.r-project.org")'
RUN
R
--vanilla
-e
'install.packages("ggplot2", repos="http://cran.us.r-project.org")'
RUN
R
--vanilla
-e
'install.packages("gridExtra", repos="http://cran.us.r-project.org")'
RUN
R
--vanilla
-e
'install.packages("reshape2", repos="http://cran.us.r-project.org")'
RUN
git clone https://github.com/rtrepos/rvle.git
\
&&
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 https://github.com/rtrepos/packages.git
\
&&
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 https://forgemia.inra.fr/record/RECORD.git
\
&&
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 https://forgemia.inra.fr/record/azodyn.git
\
&&
cd
azodyn
\
&&
git checkout origin/siwaa
-b
siwaa
\
&&
vle
-P
AZODYN configure build
RUN
chmod
-R
755 /data/vle-2001
WORKDIR
/work
siwaa_recipe/file_input.csv
deleted
100644 → 0
View file @
7dc23b27
cPlant.coef_tot_a;condClimate.meteo_file
1.25;Breteniere_1991_2018_test.csv
1.5;Breteniere_1991_2018_test.csv
1.0;Breteniere_1991_2018_test.csv
1.25;Breteniere_1991_2018_test.csv
siwaa_recipe/galaxy_tools/.shed.yml
deleted
100644 → 0
View file @
7dc23b27
categories
:
[
AgroEcosystems
]
description
:
AzodynPea experiment plan simulation
name
:
azodyn_pea
owner
:
siwaa
siwaa_recipe/galaxy_tools/siwaa_macros.xml
deleted
100644 → 0
View file @
7dc23b27
<macros>
<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"
/>
</section>
</xml>
<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"
/>
</section>
</xml>
</macros>
siwaa_recipe/galaxy_tools/tools_AZODYN.xml
deleted
100644 → 0
View file @
7dc23b27
<tool
id=
"AzodynPea"
name=
"AzodynPea experiment plan simulation"
version=
"1.0.0"
>
<description></description>
<requirements>
<container
type=
"singularity"
>
docker://rtrepos/azodyn_pea:prod
</container>
</requirements>
<command
detect_errors=
"aggressive"
>
unzip ${input_meteo};
/bin/bash -c "Rscript --verbose /data/azodyn/siwaa_recipe/razodyn.R ${file_input} ${file_outputs} 5";
zip temp_results.zip azodyn_plot.png azodyn_results_*.txt;
cp temp_results.zip ${azodyn_results};
</command>
<macros>
<import>
siwaa_macros.xml
</import>
</macros>
<inputs>
<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"
/>
</inputs>
<outputs>
<data
format=
"zip"
name=
"azodyn_results"
/>
</outputs>
<help>
input meteo zip containing eg:
==============================
meteo1.csv and meteo2.csv
AZODYN inputs eg:
=================
cPlant.coef_tot_a;condClimate.meteo_file
1.25;meteo1.csv
1.5;meteo1.csv
1.0;meteo2.csv
1.25;meteo2.csv
AZODYN outputs eg:
==================
id;path;integration
"LAI";"view/AzodynPea:PlantGrowthPea.LAI";"all"
</help>
</tool>
siwaa_recipe/job_conf.xml
deleted
100644 → 0
View file @
7dc23b27
<?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). -->
<job_conf>
<plugins>
<plugin
id=
"local"
type=
"runner"
load=
"galaxy.jobs.runners.local:LocalJobRunner"
workers=
"4"
/>
</plugins>
<destinations>
<destination
id=
"local"
runner=
"local"
>
<param
id=
"singularity_enabled"
>
true
</param>
</destination>
</destinations>
</job_conf>
siwaa_recipe/razodyn.R
deleted
100644 → 0
View file @
7dc23b27
##
# Rscript --verbose razodyn.R file_input.csv file_output.csv 5 > razodyn.txt
##
print
(
Sys.info
())
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
args
=
(
commandArgs
(
TRUE
))
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
])
##
library
(
rvle
)
print
(
paste
(
"getwd:"
,
getwd
()))
print
(
paste
(
"dir(getwd()):"
,
dir
(
getwd
())))
f
=
rvle.open
(
"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
],
integration
=
outs
$
integration
[
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
)
rvleExp.plot
(
res
)
dev.off
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment