Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
#!/bin/bash

#SBATCH --time=00:10:00


source /project/k01/shaima0d/miniconda3/bin/activate ./codeserver


export CODE_SERVER_CONFIG=/scratch/shaima0d/tickets/45007/config
export XDG_CONFIG_HOME=/scratch/shaima0d/tickets/45007
node=$(/bin/hostname)
port=10121
user=$(whoami) 
gateway=${EPROXY_LOGIN} 
submit_host=${SLURM_SUBMIT_HOST} 

if [ -f "config" ] ; then
 rm config
fi

echo "bind-addr: ${node}:${port}" >> config 
echo "auth: password" >> config
echo "password: 10DowningStreet" >> config
echo "cert: false" >> config

echo "Copy the following two lines in a new terminal one after another to create a secure SSH tunnel between your computer and Shaheen compute node."
echo "ssh  -L ${port}:localhost:${port} ${user}@${submit_host}.hpc.kaust.edu.sa" 
echo "ssh  -L ${port}:${node}:${port} ${user}@${gateway}"

code-server --auth=password --user-data-dir=${PWD}/data --extensions-dir=/scratch/shaima0d/code-server/extensions --verbose
Info

The argument --extensions-dir sets the default location where extensions are installed to
Please set the value to a suitable location under /scratch/<your-username>
and make a backup under /project/<your-project-id> as scratch gets purged every 60 days

Below is the output of your SLURM output file:

...

Once the SSH tunnel is established, paste the following URL in your browser’s address bar and you can access code-server's User Interface. You will need to use the password you have set in your jobscript (or can find it in your config file)

...

When finished, please don’t forget to scancel the job on Shaheen.

...