I have a production instance of OOD that is close to vanilla/default, and I’m trying to customize it a little. In particular, the Interactive Desktop app by default provides one core to users, and I can’t even determine how it allocates memory. Basically, I’d like to be able to specify the number of cores and memory a user can request for their Interactive Desktop session.
The edits I’ve made to
submit.yml.erb do not seem to be working, despite my success at similar changes for our Jupyter Notebook/Lab application. For instance, here are some relevant lines from my
attributes: desktop: "mate" bc_vnc_idle: 0 bc_vnc_resolution: required: true node_type: null memory: widget: "number_field" max: 128000 min: 2000 step: 2000 value: 4000 label: "Memory (MB)" help: "Enter a value in MB between 2000 and 128000" cores: widget: "number_field" max: 16 min: 1 step: 1 value: 1 label: "Number of cores" help: "Enter a value between 1 and 16"
The fields show up on the form within OOD, but if I choose, e.g., 2 cores, running
nproc on the resulting Desktop session shows 1 core only. Here are some relevant lines from
native: # ... array of command line arguments ... - "-c" - "<%= cores.blank? ? 1 : cores.to_i %>" - "--mem" - "<%= memory %>M"
This approach worked well with our Jupyter app, so I’m not sure what is failing here. I suspect I might be missing something trivial, or perhaps this behavior is different for Interactive Desktop sessions. Any advice would be welcome!