Shared drive files here.
- First complete singularity and conda setup
- In your
$HOME
directory rungit clone [email protected]:rds-research-group/ml-explainability.git
cd ml-explainability
./scripts/run_job.sh <EMAIL> <NOTEBOOK_FILE_NAME> <JOB_TIME>
- Start a slurm interactive job
- Start a singularity container
- In the container run
jupyter notebook --no-browser --port 8870
(make sure container has deps) - On local machine run
ssh -NfL 8870:localhost:8870 <NET_ID>@greene.hpc.nyu.edu
- Open brower tab with localhost address/port (in container log statements)
- Make sure there is a slurm job running postgres (run
run_job.sh
) - Start a new interactive job
srun -c8 --nodes=1 -t1:00:00 --job-name=db --mem=4GB --pty /bin/bash
- Load postgres module
module load postgresql/intel/13.2
- Run
psql -h cs011 explainability_db
,cs011
is the slurm job running postgres - Enter postgres db password
Run ssh -t -t <NET_ID>@greene.hpc.nyu.edu -L <PORT>:localhost:<PORT> ssh <NODELIST> -L <PORT>:localhost:<PORT>
- Common ports postgres: 5432 and jupyter: 8870
- Run
squeue -u $USER
to find<NODELIST>
- Check to see singularity is installed
which singularity
- Check version
singularity version
- Copy the gzipped overlay image into your
home/<NET_ID>
directorycp -rp /scratch/work/public/overlay-fs-ext3/overlay-5GB-200K.ext3.gz .
- Unzip image
gunzip overlay-5GB-200K.ext3.gz
- Launch container interactively
singularity exec --overlay overlay-5GB-200K.ext3 /scratch/work/public/singularity/cuda11.0-cudnn8-devel-ubuntu18.04.sif /bin/bash
- Inside container, install miniconda into /ext3/miniconda3
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
sh Miniconda3-latest-Linux-x86_64.sh -b -p /ext3/miniconda3
export PATH=/ext3/miniconda3/bin:$PATH
conda update -n base conda -y
- Setup pathing run
bash
- Run/reload file
source /ext3/miniconda3/etc/profile.d/conda.sh
- Export path to
.bash_profile
by runningexport PATH=/ext3/miniconda3/bin:$PATH
- Troubleshooting, this may not work and you may need to set this manually
- Manually set path, in home root
vi .bash_profile
- Add
export PATH=/ext3/miniconda3/bin:$PATH
to file (vim cheatsheet here: https://vim.rtorr.com/) - After saving and quiting reload file
source .bash_profile
- Run/reload file
- Exit container
- Relaunch Container
singularity exec --overlay overlay-5GB-200K.ext3 /scratch/work/public/singularity/cuda10.1-cudnn7-devel-ubuntu18.04.sif /bin/bash
- source
/ext3/env.sh
or source.bash_profile
depending on how you resolved pathing - Test to see dependencies are installed correctly
which python
- Check version
python --version
- Update version
conda install python
- Install additional dependencies in singularity container
pip install jupyter pandas matplotlib scipy scikit-learn seaborn
- Profit
- Cancel all jobs
squeue -u $USER | awk '{print $1}' | tail -n+2 | xargs scancel
, Ex.squeue -u $USER -n postgres
to cancel jobs named postgres - Get details into your jobs
sacct --format=User,JobID,Jobname,partition,state,time,start,end,elapsed,AveCPU,MaxRss,MaxVMSize,nnodes,ncpus,nodelist -u $USER
- Touch all files on HPC
find . -exec touch -c {} \;
- Zip scratch directory
zip -r "scratch-$(date +"%Y-%m-%d").zip" /scratch/<NET_ID>