This shows you the differences between two versions of the page.
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/ | + | Next user must embed the script into the SLURM batch job file/ |
``` | ``` | ||
#!/bin/bash | #!/bin/bash | ||
- | #SBATCH --job-name | + | #SBATCH --job-name |
- | #SBATCH --ntasks | + | #SBATCH --ntasks |
- | #SBATCH --time | + | #SBATCH --time |
- | #SBATCH --mem=2000 # Reserve | + | #SBATCH --mem=20000 # Reserve |
- | #SBATCH --partition | + | #SBATCH --partition |
- | #SBATCH --output | + | #SBATCH --output |
- | #SBATCH --error | + | #SBATCH --error |
- | #SBATCH --mail-user username@uef.fi # this is the email you wish to be notified at | + | #SBATCH --mail-user username@domain |
- | #SBATCH --mail-type ALL # ALL will alert you of job beginning, completion, failure etc | + | #SBATCH --mail-type ALL |
- | #SBATCH --auks=yes | + | #SBATCH --gres=gpu:1 |
- | module load r # load modules | + | # ACTIVATE ANACONDA |
+ | eval " | ||
+ | conda activate ai-benchmark | ||
- | Rscript hello.R | + | # RUN BENCHMARK |
+ | python3 -u ai-benchmark.py | ||
``` | ``` | ||
Line 42: | Line 45: | ||
``` | ``` | ||
- | sbatch | + | sbatch |
``` | ``` |