- Windows users are strongly recommended to install Windows Subsystem for Linux 2 (WSL). For instructions, see Windows section below.
- Participants should have Python 3 and SSH. In order to verify whether these are installed and/or to install them on MacOS, Linux, or Windows, see the Appendix section below.
- Two Python packages are required: Fabric and Decorator. To install them, type in a terminal window:
(Participants familiar with
pip install fabric decorator
conda
orvenv
, can create an environment with the following dependencies:python=3.10
,fabric
,decorator
) - Download and extract the following zip archive: link
- Test the setup:
- Access the extracted folder in your terminal (you might have to modify the path below):
cd ~/Downloads/JupyterDaskOnSLURM-workshops
- Running:
should return:
python runJupyterDaskOnSLURM.py
usage: runJupyterDaskOnSLURM.py [-h] [--local_port LOCAL_PORT] [--wait_time WAIT_TIME] (--add_platform | --one_off | --uid UID) [--mode MODE] runJupyterDaskOnSLURM.py: error: one of the arguments --add_platform/-a --one_off/-oo --uid/-u is required
- Access the extracted folder in your terminal (you might have to modify the path below):
- Download the SSH key for Spider using the link on the printout.
- Access the
JupyterDaskOnSLURM-workshops
folder in your terminal (you might have to modify the path below):cd ~/Downloads/JupyterDaskOnSLURM-workshops
- Edit the configuration file
config/platforms/platforms.ini
with your account information:- You can use
nano
(e.g.nano config/platforms/platforms.ini
to start editing, Ctrl+X to quit); - Replace the user name
stursdat-XX
with your user ID (e.g.stursdat-01
); - Replace the SSH key path
/path/to/the/ssh-key/rsa_stursdat_XX
with the actual file path (e.g./Users/fnattino/Downloads/rsa_stursdat_01
).
- You can use
- Start a Jupyter session on Spider by running the following command:
Jupyter Lab should open up in your browser!
python runJupyterDaskOnSLURM.py --uid spider-stursdat --mode run
- To install any of the tools below, you can use Homebrew or an alternative package manager.
- To install brew: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Python
- You can test whether Python is installed by opening Terminal and by typing:
which should output ‘Python 3.X.Y’
python3 --version
- If above fails, install Python 3 (we recommend python 3.10):
brew install [email protected]
- You can test whether Python is installed by opening Terminal and by typing:
- SSH
- You can test whether SSH is installed by opening Terminal and by typing:
which should output a list of usage options.
ssh
- If above fails, install SSH:
brew install openssh
- You can test whether SSH is installed by opening Terminal and by typing:
- Python
- You can test whether Python is installed by opening Terminal and by typing:
which should output ‘Python 3.X.Y’
python3 --version
- If above fails, install Python 3 (we recommend python 3.10) using the distribution package manager. For Ubuntu:
sudo apt-get install python3.10
- You can test whether Python is installed by opening Terminal and by typing:
- SSH
- You can test whether SSH is installed by opening Terminal and by typing:
which should output a list of usage options.
ssh
- If above fails, install SSH using the distribution package manager. For Ubuntu:
sudo apt install openssh-server
- You can test whether SSH is installed by opening Terminal and by typing:
- Windows subsystem for linux 2 (WSL); To install WSL:
- Open PowerShell as administrator
- Run
wsl --install
(by default the Ubuntu distribution will be installed) - Restart PC
- After restarting, follow the instructions on the automatically opened Ubuntu terminal to setup ubuntu ID and password
- From now on, follow the above instructions as given for Linux, using the Ubuntu terminal to type in commands.