Skip to content

Commit

Permalink
force XDG_RUNTIME_DIR to be a new tmp directory (#268)
Browse files Browse the repository at this point in the history
* force XDG_RUNTIME_DIR to be a new tmp directory

* should be APPTAINERENV_
  • Loading branch information
johrstrom authored Nov 4, 2024
1 parent 2a6f136 commit ae56fbd
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 APPTAINERENV_XDG_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 APPTAINERENV_XDG_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 ae56fbd

Please sign in to comment.