@@ -66,37 +66,74 @@ class MailSettings(BaseModel):
66
66
67
67
class PixiSettings (BaseModel ):
68
68
"""
69
- Configuration for Pixi task collection
70
-
71
- See https://pixi.sh/latest/reference/cli/pixi/install/#config-options for
72
- `pixi install` concurrency options.
73
- See https://docs.rs/tokio/latest/tokio/#cpu-bound-tasks-and-blocking-code
74
- for `tokio` configuration.
75
-
76
- versions:
77
- Available `pixi` versions and their `PIXI_HOME` folders.
78
- default_version:
79
- Default `pixi` version to use for task collection - must be one
80
- of `versions` keys.
81
- PIXI_CONCURRENT_SOLVES:
82
- Value of `--concurrent-solves` for `pixi install`.
83
- PIXI_CONCURRENT_DOWNLOADS:
84
- Value of `--concurrent-downloads for `pixi install`.
85
- TOKIO_WORKER_THREADS:
86
- From tokio docs, "The core threads are where all asynchronous code
87
- runs, and Tokio will by default spawn one for each CPU core. You can
88
- use the environment variable TOKIO_WORKER_THREADS to override the
89
- default value."
69
+ Configuration for Pixi Task collection.
70
+
71
+ In order to use Pixi for Task collection, you must have one or more Pixi
72
+ binaries in your machine
73
+ (see
74
+ [example/get_pixi.sh](https://github.com/fractal-analytics-platform/fractal-server/blob/main/example/get_pixi.sh)
75
+ for installation example).
76
+
77
+ To let Fractal Server use these binaries for Task collection, a JSON file
78
+ must be prepared with the data to populate `PixiSettings` (arguments with
79
+ default values may be omitted).
80
+
81
+ The path to this JSON file must then be provided to Fractal via the
82
+ environment variable `FRACTAL_PIXI_CONFIG_FILE`.
90
83
"""
91
84
92
85
versions : DictStrStr
86
+ """
87
+ A dictionary with Pixi versions as keys and paths to the corresponding
88
+ folder as values.
89
+
90
+ E.g. let's assume that you have Pixi v0.47.0 at
91
+ `/pixi-path/0.47.0/bin/pixi` and Pixi v0.48.2 at
92
+ `/pixi-path/0.48.2/bin/pixi`, then
93
+ ```json
94
+ "versions": {
95
+ "0.47.0": "/pixi-path/0.47.0",
96
+ "0.48.2": "/pixi-path/0.48.2"
97
+ }
98
+ ```
99
+ """
93
100
default_version : str
101
+ """
102
+ Default Pixi version to be used for Task collection.
94
103
104
+ Must be a key of the `versions` dictionary.
105
+ """
95
106
PIXI_CONCURRENT_SOLVES : int = 4
107
+ """
108
+ Value of
109
+ [`--concurrent-solves`](https://pixi.sh/latest/reference/cli/pixi/install/#arg---concurrent-solves)
110
+ for `pixi install`.
111
+ """
96
112
PIXI_CONCURRENT_DOWNLOADS : int = 4
113
+ """
114
+ Value of
115
+ [`--concurrent-downloads`](https://pixi.sh/latest/reference/cli/pixi/install/#arg---concurrent-downloads)
116
+ for `pixi install`.
117
+ """
97
118
TOKIO_WORKER_THREADS : int = 2
119
+ """
120
+ From
121
+ [Tokio documentation](
122
+ https://docs.rs/tokio/latest/tokio/#cpu-bound-tasks-and-blocking-code
123
+ )
124
+ :
125
+
126
+ The core threads are where all asynchronous code runs,
127
+ and Tokio will by default spawn one for each CPU core.
128
+ You can use the environment variable `TOKIO_WORKER_THREADS` to override
129
+ the default value.
130
+ """
98
131
DEFAULT_ENVIRONMENT : str = "default"
132
+ """
133
+ """
99
134
DEFAULT_PLATFORM : str = "linux-64"
135
+ """
136
+ """
100
137
101
138
@model_validator (mode = "after" )
102
139
def check_pixi_settings (self ):
@@ -578,6 +615,9 @@ def PIP_CACHE_DIR_ARG(self) -> str:
578
615
"""
579
616
580
617
FRACTAL_PIXI_CONFIG_FILE : Path | None = None
618
+ """
619
+ Path to the Pixi configuration JSON file that will populate `PixiSettings`.
620
+ """
581
621
582
622
pixi : PixiSettings | None = None
583
623
0 commit comments