Skip to content

Commit

Permalink
remove tutorials as an option (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
johrstrom authored Oct 10, 2023
1 parent 4342ba8 commit 3764080
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 36 deletions.
7 changes: 0 additions & 7 deletions form.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ form:
- bc_num_hours
- node_type
- num_cores
- include_tutorials
- bc_email_on_started
attributes:
num_cores:
Expand Down Expand Up @@ -306,9 +305,3 @@ attributes:
data-option-for-cluster-kubernetes-test: false,
data-option-for-cluster-kubernetes-dev: false
]
include_tutorials:
widget: "check_box"
label: Include access to OSC tutorial/workshop materials.
help: |
Accessing the tutorial materials will start you with a clean environment.
While running in tutorial mode you will not have access to the files your $HOME.
18 changes: 0 additions & 18 deletions template/before.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,3 @@ password="$(create_passwd 16)"
csrf_token=<%= SecureRandom.uuid %>

export RSTUDIO_PASSWORD="${password}"

<%- if context.include_tutorials == "1" -%>
<%-
workshop_base = "/users/PZS0645/support/workshop/ParallelR/"
workshop_src = if /3.6.3/.match?(context.version)
workshop_base + "3.6.3/"
else
workshop_base + "3.6.1/"
end
-%>
#
# Create workshop/tutorial notebooks
#
# Copy over workshops/tutorials
set -x
rsync -avz "<%= workshop_src %>" "<%= session.staged_root %>/ParallelR/"
{ set +x; } 2>/dev/null
<%- end -%>
12 changes: 1 addition & 11 deletions template/script.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,8 @@ setup_env () {
module load rstudio_launcher/centos7
<%- end -%>
module load <%= all_modules %>

<%- if context.include_tutorials == "1" %>
export R_LIBS_USER="<%= tutorial_dir %>/Rworkshop"
mkdir -p "<%= tutorial_dir %>/Rworkshop"
<%- end %>
}

setup_env

# if you're in a specialized version of RStudio (classes or tutorials)
Expand Down Expand Up @@ -110,12 +106,6 @@ set -x
echo "Starting up rserver... at $(date)"

<%- if context.cluster !~ /kubernetes/ -%>
# --contain is used to override the bindpaths specified in OSC's
# singularity.conf which would otherwise conflict in /etc
# using --contain requires us to bind mount in addition directories including
# /dev and /proc
# optional_tutorial_home_bind is used when include_tutorials to change the home
# directory to get a clean environment without clobbering files
bwrap --dev-bind / / --tmpfs /tmp \
--bind $WORKING_DIR/etc /etc/rstudio \
--setenv LD_LIBRARY_PATH "$LD_LIBRARY_PATH" \
Expand Down

0 comments on commit 3764080

Please sign in to comment.