FROM plumed:fedora39

RUN source /etc/bashrc \
 && module load mpi \
 && export OMPI_MCA_btl_base_warn_component_unused=0 \
 && export OMPI_MCA_btl_base_verbose=0 \
 && export OMPI_MCA_plm=isolated \
 && export OMPI_MCA_btl_vader_single_copy_mechanism=none \
 && export OMPI_MCA_rmaps_base_oversubscribe=yes \
 && export PATH=$HOME/opt/bin:$PATH \
 && export CPATH=$HOME/opt/include:$CPATH \
 && export INCLUDE=$HOME/opt/include:$INCLUDE \
 && export LIBRARY_PATH=$HOME/opt/lib:$LIBRARY_PATH \
 && export LD_LIBRARY_PATH=$HOME/opt/lib:$LD_LIBRARY_PATH \
 && cd plumed2 \
 && source ./sourceme.sh \
 && cd plugins/pycv \
 && ./configurePyCV.sh \
 && ln -s $(realpath ../../regtest/scripts) ./regtest/scripts \
 && make check_standalone
# To whom is reading: python > 3.10 gives some problems when using pycv
# from plumed whithin python. SO please remember to chante  "check_standalone"
#into "check" to verify that the problem is fixed
