Тёмный

ARCC Orientation 07: Create and Load Python Virtual Environment and Install pip Libraries 

Sean Mondesire
Подписаться 97
Просмотров 448
50% 1

This video explains how to create and load a python environment in a SLURM cluster environment, install Python libraries with pip, then submit a SLURM job that activates that new virtual environment and use the libraries you just installed. In this example, we create a new virtual environment and install the Dask library then run it on the cluster.
Commands to create the virtual environment:
module load anaconda/anaconda3
pip install virtualenv
python3 -m venv testenv
source ~/testenv/bin/activate
pip install dask
deactivate
SLURM Script:
#!/bin/bash
#SBATCH --account=YOUR_ACCOUNT
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --time=00:01:00
#SBATCH --job-name=daskex
#SBATCH --error=daskex-%J.err
#SBATCH --output=daskex-%J.out
##Load Modules
module load anaconda/anaconda3
Run job ##
source ~/testenv/bin/activate
srun python daskex.py
deactivate

Опубликовано:

 

21 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии    
Далее
ARCC Orientation 06: Slurm - Submit a Job
11:49
🎙ПОЮ ВЖИВУЮ!
3:07:23
Просмотров 914 тыс.
This is How I Scrape 99% of Sites
18:27
Просмотров 129 тыс.
Think Fast, Talk Smart: Communication Techniques
58:20