Skip to content

Commit

Permalink
vsc tunnel
Browse files Browse the repository at this point in the history
  • Loading branch information
chunjie-sam-liu committed Nov 12, 2024
1 parent b725f03 commit 928cec3
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 17 deletions.
13 changes: 6 additions & 7 deletions forward.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@

errout_dir="/home/liuc9/tmp/errout/jrocker"

for j in `ls ${errout_dir}`
do
cmd="grep -i 'ssh -N -L' ${errout_dir}/${j}"
# echo ${cmd}
out=`eval ${cmd}`
echo "${out} &"
done
for j in $(ls ${errout_dir}/j*er.job.*); do
suffix=$(basename ${j})
cmd="grep -i 'ssh -N -L' ${j}"
out=$(eval ${cmd})
echo "${out} & # ${suffix}"
done
17 changes: 17 additions & 0 deletions vsc-gpu-tunnel.slrm
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
#SBATCH --job-name=vsc-gpu-tunnel
#SBATCH --ntasks=1
#SBATCH --gres=gpu:1
#SBATCH --partition=gpuq
#SBATCH --mem=300G
#SBATCH --time=120:00:00
#SBATCH --output=/home/%u/tmp/errout/jrocker/vsc-gpu-tunnel.job.%j
# customize --output path as appropriate (to a directory readable only by the user!)

source ~/tools/anaconda3/bin/activate
MACHINENAME=$(uuidgen | cut -d"-" -f1)

echo $MACHINENAME
# code tunnel --random-name --no-sleep --accept-server-license-terms

code tunnel user login --provider github && code tunnel --name ${MACHINENAME} --no-sleep --accept-server-license-terms
17 changes: 17 additions & 0 deletions vsc-tunnel.slrm
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
#SBATCH --job-name=vsc-tunnel
#SBATCH --signal=USR2
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=50
#SBATCH --mem=100G
#SBATCH --time=1080:00:00
#SBATCH --output=/home/%u/tmp/errout/jrocker/vsc-tunnel.job.%j
# customize --output path as appropriate (to a directory readable only by the user!)

source ~/tools/anaconda3/bin/activate
MACHINENAME=$(uuidgen | cut -d"-" -f1)

echo $MACHINENAME
# code tunnel --random-name --no-sleep --accept-server-license-terms

code tunnel user login --provider github && code tunnel --name ${MACHINENAME} --no-sleep --accept-server-license-terms
10 changes: 0 additions & 10 deletions vscode-tunnel.slurm

This file was deleted.

0 comments on commit 928cec3

Please sign in to comment.