Skip to content

Commit 487f6bc

Browse files
committed
Update HPC instructions for changes in styxsingularity 0.6
1 parent 9f318c7 commit 487f6bc

1 file changed

Lines changed: 1 addition & 43 deletions

File tree

src/getting_started/hpc.md

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -4,51 +4,9 @@ Styx runners can also be used on High-Performance Computing (HPC) environments.
44
default `LocalRunner` can be used if the required software is available. However, in
55
most cases, software will need to be installed or made available via container. In most
66
HPC environments, Apptainer (formerly Singularity), is the container system of choice
7-
(in place of Docker). Styx provides an official Apptainer/Singularity runner,
7+
(in place of Docker). Styx provides an [official Apptainer/Singularity runner](https://github.com/styx-api/styxsingularity),
88
`SingularityRunner`, that can be used in HPC environments.
99

10-
To use the `SingularityRunner`, the containers must first be downloaded such that
11-
they can be mapped for use. The key to map the container location to is the container
12-
metadata for each wrapped command. Let's take a look at an example:
13-
14-
First, we'll note that `Mrtrix3` has the following container metadata:
15-
16-
```yaml
17-
{
18-
"container-image": {
19-
"image": "mrtrix3/mrtrix3:3.0.4",
20-
"type": "docker"
21-
}
22-
}
23-
```
24-
25-
We'll also download the container and install package associated with the runner.
26-
27-
```bash
28-
apptainer pull docker://mrtrix3/mrtrix3:3.0.4 /container/directory/mrtrix3_3.0.4.sif
29-
30-
pip install styxsingularity
31-
```
32-
33-
Now to use our runner:
34-
35-
```Python
36-
from styxdefs import set_global_runner
37-
from styxsingularity import SingularityRunner
38-
39-
my_runner = SingularityRunner(
40-
images={
41-
"mrtrix3/mrtrix3:3.0.4": "/container/directory/mrtrix3_3.0.4.sif"
42-
}
43-
)
44-
set_global_runner(my_runner)
45-
46-
# Now you can use Styx functions as usual
47-
```
48-
49-
> [!TIP]
50-
> If you wish to use a different downloaded container, you can map the key to the path of the other container. Note, commands may not be all supported if non-listed container used.
51-
5210
## Local scratch storage
5311

5412
On HPC environments, local scratch storage is often made available on computing

0 commit comments

Comments
 (0)