Hi,
I am working on Open OnDemand Interactive App that uses Apptainer.
In the file form.yml.erb there is a string Attribute that is location of config file I want to bind to the Apptainer image (e.g., APP_CONFIG).
In submit.yml.erb in batch_connect I use script_wrapper where I start the Apptainer image:
batch_connect:
template: vnc
set_host: "host=$(hostname)"
script_wrapper:
...
%s
...
apptainer exec -B "<%= APP_CONFIG %>"/config.sh:/opt/config.sh <%= image %> /bin/bash container.sh
However, I haven’t been able to successfully pass the value of APP_CONFIG to Apptainer this way.
When I use
<%= APP_CONFIG %>/config.sh,
I get an error:
uninitialized constant BatchConnect::SessionContext::APP_CONFIG.
If I use
<%= context.APP_CONFIG %> instead,
I get the error:
undefined local variable or method context for #<BatchConnect::SessionContext:0x00007f871cc163f8>.
I have tried different combinations as well - passing the value of APP_CONFIG with %{APP_CONFIG}, declaring variable at the beginning of the file and use it as ${app_config}, etc., but haven’t been able to make this work in the submit.yml.erb file.
Can you please let me know what I am missing and advise me on how to achieve this correctly?
We have Open OnDemand 2.0.32 on our cluster.
Please let me know if you need any additional information.
Thank you,
Natasha