User Tools

Site Tools


guides:slurm:anaconda

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
guides:slurm:anaconda [15.11.2021 15:58]
Administrator created
guides:slurm:anaconda [15.11.2021 16:04] (current)
Administrator
Line 13: Line 13:
 # Create Anaconda environment # Create Anaconda environment
 conda create --name ai-benchmark python mamba conda create --name ai-benchmark python mamba
 +conda activate ai-benchmark
 mamba install cudatoolkit==11.5 tensorflow keras==2.6.* mamba install cudatoolkit==11.5 tensorflow keras==2.6.*
-results = benchmark.run() +pip3 install --user ai-bechmark
-print (results)+
 ``` ```
  
  
-Next user must embed the script into the SLURM batch job file/control file (e.g. scriptR.sbatch):+Next user must embed the script into the SLURM batch job file/control file (e.g. runPython.sbatch):
  
 ``` ```
 #!/bin/bash #!/bin/bash
-#SBATCH --job-name helloworld # Name for your job +#SBATCH --job-name ai-benchmark # Name for your job 
-#SBATCH --ntasks 1 # Number of task +#SBATCH --ntasks 2              # Number of (cpu) tasks 
-#SBATCH --time 5 # Runtime in minutes. +#SBATCH --time 15               # Runtime in minutes. 
-#SBATCH --mem=2000 # Reserve GB RAM for the job +#SBATCH --mem=20000             # Reserve 20 GB RAM for the job 
-#SBATCH --partition serial # Partition to submit +#SBATCH --partition gpu         # Partition to submit 
-#SBATCH --output hello.out # Standard out goes to this file +#SBATCH --output benchmark-%j.txt       # Standard out goes to this file 
-#SBATCH --error hello.err # Standard err goes to this file +#SBATCH --error benchmark-%j.txt        # Standard err goes to this file 
-#SBATCH --mail-user username@uef.fi # this is the email you wish to be notified at +#SBATCH --mail-user username@domain     # this is the email you wish to be notified at 
-#SBATCH --mail-type ALL # ALL will alert you of job beginning, completion, failure etc +#SBATCH --mail-type ALL         # ALL will alert you of job beginning, completion, failure etc 
-#SBATCH --auks=yes         Enable kerberos support with auks+#SBATCH --gres=gpu:1            Reserve 1 GPU for usage
  
-module load r load modules+ACTIVATE ANACONDA 
 +eval "$(conda shell.bash hook)" 
 +conda activate ai-benchmark
  
-Rscript hello.R Execute the script+RUN BENCHMARK 
 +python3 -u ai-benchmark.py
  
 ``` ```
Line 42: Line 45:
  
 ``` ```
-sbatch scriptR.sbatch+sbatch runPython.sbatch
 ``` ```
guides/slurm/anaconda.1636984730.txt.gz · Last modified: 15.11.2021 15:58 by Administrator