Skip to content

Commit 774d88f

Browse files
committed
Deploying to gh-pages from @ 9472d83 🚀
1 parent 9421363 commit 774d88f

18 files changed

Lines changed: 1110 additions & 71 deletions

automation.qmd

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Automation
2+
3+
## Automation
4+
5+
Automation is important in scientific computing:
6+
7+
- It is common to have different workflows using one piece of software
8+
- Many different research artifacts may be produced from one analysis/dataset
9+
- Figures, data files, statistical results etc.
10+
- Different people may need/want to create the same artifacts
11+
12+
By automating tasks as much as possible, we make it easier to perform the actions
13+
and produce the results we want
14+
15+
## Why automate?
16+
17+
There are many benefits to automating workflows:
18+
19+
- Faster
20+
- Code as instructions
21+
- No need to write how to do X
22+
- Can be tested!
23+
- Flexibility
24+
- Improved control
25+
- Extendable
26+
- Less chance of mistakes
27+
- Computers are good at following instructions
28+
29+
## Automation and reproducibility
30+
31+
- Automating workflows tracks how research artifacts were actually produced
32+
33+
- Makes it easier for others to use and verify our work
34+
35+
- Results are more trustworthy
36+
37+
## How to automate
38+
39+
- Bash scripts
40+
- Common on HPC, works on all Linux machines
41+
- Can easily use command line programs
42+
- More complicated scripts can become verbose
43+
- All variables are strings (lots of footguns)
44+
45+
- Python scripts
46+
- Much more "batteries included" e.g. argument parsing is built into the core library
47+
- Access to python libraries
48+
- Not always available, but will run on any machine with python installed
49+
- Not as easy to invoke external programs
50+
51+
- Scripts should be written like any other code!

custom.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*-- scss:defaults --*/
2+
3+
$presentation-font-size-root: 1.5em;
4+
$presentation-line-height: 1.5em;
5+
6+
ul {
7+
display: flex;
8+
align-items: center;
9+
}

dependencies.qmd

Lines changed: 68 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,20 @@
2525
- Versions of each dependency e.g. numpy 2.3.9
2626
- Where/how to aquire the dependency
2727

28+
## How to declare data dependencies
29+
30+
:::{.columns}
31+
:::{.column width="30%"}
32+
- Links to publicly accessible data dependencies
33+
- Zenodo or some other long term solution
34+
- Reference specific versions of the data
35+
- Ideally automate the fetching of the data
36+
:::
37+
:::{.column width="70%"}
38+
![Example of a zenodo listing. Note how each version of the dataset has a different reference](img/zenodo.jpg)
39+
:::
40+
:::
41+
2842
## Dependency metadata
2943

3044
- There are automated ways of resolving dependencies
@@ -36,8 +50,58 @@
3650
dependency you are using
3751
- Important to track both - lock files record the exact environment you use
3852

39-
## System dependencies
53+
## System dependencies - Conda
54+
55+
- Python centric package manager
56+
- Can be used for installing python packages
57+
- Also able to manage environments
58+
- useful for per-project dependencies
59+
- can install system dependencies
60+
- even different python versions!
61+
- Available on most HPC systems (usually as Miniconda)
62+
- Can export environments to text-based files
63+
64+
## System dependencies - Containers
65+
66+
:::{.columns}
67+
:::{.column width="60%"}
68+
- Containers package up code and all dependencies
69+
- Virtualised operating system
70+
- Faster than a virtual machine with many of the benefits
71+
- Examples:
72+
- Docker (Closed source but popular)
73+
- Podman (Open source alternative)
74+
- Apptainer (HPC focused/compatible)
75+
- Portable and cross-platform
76+
:::
77+
:::{.column width="40%"}
78+
![](img/docker-logo-ocean-blue.svg)
79+
![](img/apptainer.svg)
80+
![](img/podman-logo-source.svg)
81+
:::
82+
:::
83+
84+
## System dependencies - Nix/Guix
85+
86+
:::{.columns}
87+
:::{.column width="60%"}
88+
What they have in common:
89+
90+
- Declarative package managers
91+
- Use pure functional languages to create environments
92+
- same inputs = same outputs
93+
- Packages are hashed
94+
- can lookup if package already exists locally
95+
- Publicly hosted and *versioned* package repository
96+
- All packages have defined and unchanging dependencies
97+
- Handles all dependencies automatically
98+
- even linked libraries, so no hidden dependencies!
99+
:::
100+
:::{.column width="40%"}
101+
How they differ:
40102

41-
- Conda
42-
- Docker
43-
- Nix/Guix
103+
- Nix language vs Guile scheme
104+
- Guix package repository only hosts fully open source packages
105+
- Can be difficult when using vendor-locked software e.g. CUDA
106+
:::
107+
:::

img/Guix.png

7.32 KB
Loading

img/apptainer.svg

Lines changed: 42 additions & 0 deletions
Loading

img/docker-logo-ocean-blue.svg

Lines changed: 33 additions & 0 deletions
Loading
64 KB
Loading
101 KB
Loading

img/nixos-logo.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)