Working on the HPC cluster
1. Common Commands
- Connect to Sherlock:
ssh login.sherlock.stanford.edu
- Enter a computing node:
sdev
- Load Python:
module load python/3.9.0 # option 1 ml python/3.9.0 # option 2
- Submit script:
bash submit.sh
2. Other Commands
- Create a Python environment:
python3 -m venv myenv source myenv/bin/activate python3 --version # to check python version python3 runfile.py deactivate # to deactivate the environment
3. Commands Needed to Troubleshoot
- Return Python version:
python --version
pip3 list
conda info
which pip
which conda
which python3
cd /d e:\
- Copy files
cp -av HPC ~/hpc-share/
- Create a link path.
ln -s /nfs/hpc/share/astudilb hpc-share
- Show what is in the path, including hidden elements:
ls -a hpc-share/
```