Skip to content

Commit cfd9c4b

Browse files
authored
Create run-seaborn-ex.sh
1 parent 399cdfa commit cfd9c4b

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
# Remember to change this to your own project ID!
3+
#SBATCH -A naiss2025-22-934
4+
# We are asking for 5 minutes
5+
#SBATCH --time=00:05:00
6+
# Asking for one core (may need to add more for later pandas exercises)
7+
#SBATCH -n 1
8+
9+
# Change to the directory where the data files and program are located
10+
# Change the below to your own path to where you placed the example programs
11+
cd /cfs/klemming/projects/snic/hpc-python-spring-naiss/<mydir-name>/HPC-python/Exercises/examples/programs/
12+
13+
# Load the modules we need
14+
module load cray-python/3.11.7
15+
# If not using virtual environment, uncomment next module load
16+
# statement and comment out source statement further down:
17+
#module load PDCOLD/23.12 matplotlib/3.8.2-cpeGNU-23.12
18+
# Seaborn is in matplotlib/3.8.2-cpeGNU-23.12
19+
20+
# Prepare a virtual environment with matplotlib and seaborn
21+
# - do this before running the batch script
22+
# python -m venv --system-site-packages mymatplotlib
23+
# source mymatplotlib/bin/activate
24+
# pip install matplotlib seaborn
25+
26+
# Later, during the batch job, you would just activate
27+
# the virtual environment
28+
source <path-to>/mymatplotlib
29+
30+
# Run your Python script (change as desired)
31+
python seaborn-ex1.py

0 commit comments

Comments
 (0)