Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RStudio custom container option #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions rstudio/form.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ form:
- exclusive
- use_cgw
- cgw
- use_custom_container
- custom_container
attributes:
bc_account:
label: "ACCRE Slurm Group"
Expand Down Expand Up @@ -77,3 +79,20 @@ attributes:
- [ "Any Node", "any" ]
- [ "119GB Memory", "119g" ]
- [ "246GB Memory", "246g" ]
use_custom_container:
widget: check_box
checked_value: 1
unchecked_value: 0
label: "Use your own custom Container"
help: |
Check this box if you wish to run your job using a custom singularity
container that you provide rather than one available in the list above.
Your container must contain or have access to a working R environment
and RStudio installation and the resssion executable must be in the user path.
custom_container:
label: "Custom Container"
value: ""
help: |
Leave blank unless using a custom Singularity container. If using a custom
singularity container, enter the absolute path to your container
file which must be accessible by the ACCRE compute nodes.
5 changes: 4 additions & 1 deletion rstudio/template/script.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
setup_env () {
module purge

<%- if context.use_custom_container.to_i == 1 -%>
RSTUDIO_SERVER_IMAGE=<%= context.custom_container %>
<%- else -%>
accre_rversion=<%= context.version %>
if [[ "$accre_rversion" == "r3.6.0.v3" ]]
then
Expand All @@ -15,7 +18,7 @@ elif [[ "$accre_rversion" == "r4.0.5.v1" ]]
then
export RSTUDIO_SERVER_IMAGE="/accre/common/singularity/accre.internal.rstudio.4.0.5.v1.sif"
fi

<%- end -%>

}
setup_env
Expand Down