Skip to content

Commit

Permalink
force XDG_RUNTIME_DIR to be a new tmp directory
Browse files Browse the repository at this point in the history
  • Loading branch information
johrstrom committed Nov 4, 2024
1 parent 483cee2 commit 1fd5d10
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
7 changes: 2 additions & 5 deletions apps.awesim.org/apps/bc_desktop/submit/vdi.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,12 @@ batch_connect:
[[ $(type -t module) == "function" ]] && export -f module

# MATE doesn't like /var/run/$(id -u) and ascend-login doesn't have $TMPDIR
export XDG_RUNTIME_DIR="<%= ['ascend-login', 'cardinal-login'].include?(cluster) ? '/tmp' : '$TMPDIR' %>/xdg_runtime"
export XDG_RUNTIME_DIR=$(mktemp -d)
export APPTAINER_ENVXDG_RUNTIME_DIR=$XDG_RUNTIME_DIR

# reset SLURM_EXPORT_ENV so that things like srun & sbatch work out of the box
export SLURM_EXPORT_ENV=ALL
script:
job_environment:
XDG_RUNTIME_DIR: "/tmp/xdg_runtime"
SINGULARITY_ENVXDG_RUNTIME_DIR: "/tmp/xdg_runtime"
APPTAINER_ENVXDG_RUNTIME_DIR: "/tmp/xdg_runtime"
native:
<%- if ['ascend-login', 'cardinal-login'].include?(cluster) -%>
singularity_container: "<%= container_lookup[cluster] %>"
Expand Down
7 changes: 2 additions & 5 deletions ondemand.osc.edu/apps/bc_desktop/submit/vdi.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,12 @@ batch_connect:
[[ $(type -t module) == "function" ]] && export -f module

# MATE doesn't like /var/run/$(id -u) and ascend-login doesn't have $TMPDIR
export XDG_RUNTIME_DIR="<%= ['ascend-login', 'cardinal-login'].include?(cluster) ? '/tmp' : '$TMPDIR' %>/xdg_runtime"
export XDG_RUNTIME_DIR=$(mktemp -d)
export APPTAINER_ENVXDG_RUNTIME_DIR=$XDG_RUNTIME_DIR

# reset SLURM_EXPORT_ENV so that things like srun & sbatch work out of the box
export SLURM_EXPORT_ENV=ALL
script:
job_environment:
XDG_RUNTIME_DIR: "/tmp/xdg_runtime"
SINGULARITY_ENVXDG_RUNTIME_DIR: "/tmp/xdg_runtime"
APPTAINER_ENVXDG_RUNTIME_DIR: "/tmp/xdg_runtime"
native:
<%- if ['ascend-login', 'cardinal-login'].include?(cluster) -%>
singularity_container: "<%= container_lookup[cluster] %>"
Expand Down

0 comments on commit 1fd5d10

Please sign in to comment.