#!/bin/sh #SBATCH --job-name=mg-govdoc-cr #SBATCH --partition=cpu-g2-mem2x #update this line - use hyakalloc to find partitions you can use #SBATCH --time=03:00:00 #SBATCH --nodes=1 #SBATCH --ntasks=4 #SBATCH --mem=64G #SBATCH --signal=USR2 #SBATCH --output=%x_%j.out # This script will request a single CPU with four threads with 20GB of RAM for 2 hours. # You can adjust --time, --nodes, --ntasks, and --mem above to adjust these settings for your session. # --output=%x_%j.out creates a output file called rstudio-server_XXXXXXXX.out # where the %x is short hand for --job-name above and the X's are an 8-digit # jobID assigned by SLURM when our job is submitted. RSTUDIO_CWD="/mmfs1/home/mjilg/git/govdoc-cr-analysis" # UPDATE THIS LINE RSTUDIO_SIF="rstudio_latest.sif" # update this line # Create temp directory for ephemeral content to bind-mount in the container RSTUDIO_TMP=$(/usr/bin/python3 -c 'import tempfile; print(tempfile.mkdtemp())') mkdir -p -m 700 \ ${RSTUDIO_TMP}/run \ ${RSTUDIO_TMP}/tmp \ ${RSTUDIO_TMP}/var/lib/rstudio-server cat > ${RSTUDIO_TMP}/database.conf < ${RSTUDIO_TMP}/rsession.sh <&2 <&2 exit $APPTAINER_EXIT_CODE