You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -199,7 +235,73 @@ The TUI should be pretty self-explanatory. It gives an overview of your jobs on
199
235
refreshed every couple of seconds, lets you see the logs and all the other functionality of the CLI,
200
236
just in an interactive way.
201
237
238
+
### coman.toml config file
239
+
240
+
The config file options look as follows:
241
+
242
+
```toml
243
+
name = "myproject"# the name of the project, used to generate job names
244
+
245
+
[cscs]
246
+
# check https://docs.cscs.ch/access/firecrest/#firecrest-deployment-on-alps for possible system and platform combinations
247
+
current_system = "daint"# what system/cluster to execute commands on
248
+
current_platform = "HPC"# what platform to execute commands on (valid: HPC, ML or CW)
249
+
250
+
251
+
image = "ubuntu"# default docker image to use
252
+
253
+
command = ["sleep", "1"] # command to execute within the container, i.e. the job you want to run
254
+
255
+
# the sbatch script you want to execute
256
+
# this gets templated with values specified in the {{}} and {% %} expressions (see https://keats.github.io/tera/docs/#templates for
257
+
# more information on the template language). Note, this can also just be hardcoded without any template parameters.
258
+
# Available parameters:
259
+
# name: the name of the job
260
+
# environment_file: the path to the edf environment toml file in the cluster
261
+
# command: the command to run
262
+
# container_workdir: the working directory inside the container
263
+
sbatch_script_template = """
264
+
#!/bin/bash
265
+
#SBATCH --job-name={{name}}
266
+
#SBATCH --ntasks=1
267
+
#SBATCH --time=10:00
268
+
srun {% if environment_file %}--environment={{environment_file}}{% endif %} {{command}}
269
+
"""
270
+
271
+
# the edf environment toml file template
272
+
# this gets templated with values specified in the {{}} and {% %} expressions (see https://keats.github.io/tera/docs/#templates for
273
+
# more information on the template language). Note, this can also just be hardcoded without any template parameters.
274
+
# Available parameters:
275
+
# edf_image: the container image to use, in edf format
276
+
# container_workdir: the working directory to use within the container
277
+
# env: a dictionary of key/value pairs for environment variables to set in the container
278
+
# mount: a dictionary of key/value pairs for folders to mount to the container, with key being the path in the cluster and value being the path in the container
279
+
edf_file_template = """
280
+
{% if edf_image %}image = "{{edf_image}}"{% endif %}
281
+
mounts = [{% for source, target in mount %}"{{source}}:{{target}}",{% endfor %}]
282
+
workdir = "{{container_workdir}}"
283
+
284
+
[env]
285
+
{% for key, value in env %}
286
+
{{key}} = "{{value}}"
287
+
{% endfor %}
288
+
"""
289
+
290
+
# set environment variables that should be passed to a job
291
+
[cscs.env]
292
+
ENV_VAR = "env_value"
293
+
294
+
```
295
+
#### Editing the config
202
296
297
+
You can edit the config file directly or (safer) use coman commands to do so:
298
+
```shell
299
+
coman config get cscs.current_system
300
+
```
301
+
302
+
```shell
303
+
coman config set cscs.current_system "daint"
304
+
```
203
305
204
306
## Development
205
307
@@ -235,4 +337,4 @@ If you want to use cargo to install `coman`, make sure to remove any version of
Copy file name to clipboardExpand all lines: coman/.config/config.toml
+33-5Lines changed: 33 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,21 @@
1
1
[cscs]
2
-
current_system = "daint"
3
-
current_platform = "HPC"
2
+
# check https://docs.cscs.ch/access/firecrest/#firecrest-deployment-on-alps for possible system and platform combinations
3
+
current_system = "daint"# what system/cluster to execute commands on
4
+
current_platform = "HPC"# what platform to execute commands on (valid: HPC, ML or CW)
4
5
5
-
image = "ubuntu"
6
6
7
-
command = ["sleep", "1"]
7
+
image = "ubuntu"# default docker image to use
8
8
9
+
command = ["sleep", "1"] # command to execute within the container, i.e. the job you want to run
10
+
11
+
# the sbatch script you want to execute
12
+
# this gets templated with values specified in the {{}} and {% %} expressions (see https://keats.github.io/tera/docs/#templates for
13
+
# more information on the template language). Note, this can also just be hardcoded without any template parameters.
14
+
# Available parameters:
15
+
# name: the name of the job
16
+
# environment_file: the path to the edf environment toml file in the cluster
17
+
# command: the command to run
18
+
# container_workdir: the working directory inside the container
9
19
sbatch_script_template = """
10
20
#!/bin/bash
11
21
#SBATCH --job-name={{name}}
@@ -14,6 +24,14 @@ sbatch_script_template = """
14
24
srun {% if environment_file %}--environment={{environment_file}}{% endif %} {{command}}
15
25
"""
16
26
27
+
# the edf environment toml file template
28
+
# this gets templated with values specified in the {{}} and {% %} expressions (see https://keats.github.io/tera/docs/#templates for
29
+
# more information on the template language). Note, this can also just be hardcoded without any template parameters.
30
+
# Available parameters:
31
+
# edf_image: the container image to use, in edf format
32
+
# container_workdir: the working directory to use within the container
33
+
# env: a dictionary of key/value pairs for environment variables to set in the container
34
+
# mount: a dictionary of key/value pairs for folders to mount to the container, with key being the path in the cluster and value being the path in the container
17
35
edf_file_template = """
18
36
{% if edf_image %}image = "{{edf_image}}"{% endif %}
19
37
mounts = [{% for source, target in mount %}"{{source}}:{{target}}",{% endfor %}]
0 commit comments