@@ -31,14 +31,23 @@ git clone https://github.com/dstackai/gpuhunt.git
3131- ** Online providers** offer dynamic machine configurations that are available at the very moment
3232 when you fetch configurations (e.g., GPU marketplaces).
3333 ` gpuhunt ` collects online providers' instance offers each time a ` dstack ` user provisions a new instance.
34- Examples: ` tensordock ` , ` vastai ` , etc.
34+ Examples: ` vastai ` , ` hotaisle ` , etc.
3535
3636### 1.3. Create the provider class
3737
3838Create the provider class file under ` src/gpuhunt/providers ` .
3939
40- Make sure your class extends the [ ` AbstractProvider ` ] ( https://github.com/dstackai/gpuhunt/blob/main/src/gpuhunt/providers/__init__.py )
41- base class. See its docstrings for descriptions of the methods that your class should implement.
40+ Make sure your class extends either ` OnlineProvider ` or ` OfflineProvider ` from
41+ [ base.py] ( https://github.com/dstackai/gpuhunt/blob/main/src/gpuhunt/providers/base.py ) ,
42+ matching the choice you made above.
43+
44+ Both kinds implement ` get ` , returning ` CatalogItem ` s with ` provider ` set to your provider's ` NAME ` .
45+ Additionally:
46+
47+ - Online providers implement the ` from_env ` classmethod, which reads credentials from the
48+ environment with ` get_creds_env ` and raises ` MissingCredsError ` if one is missing. Providers that
49+ raise it are skipped by ` default_catalog() ` rather than failing the whole catalog.
50+ - Offline providers may override ` filter ` to omit some offers from the published catalog.
4251
4352Refer to examples:
4453- Offline providers:
@@ -47,8 +56,8 @@ Refer to examples:
4756 [ azure.py] ( https://github.com/dstackai/gpuhunt/blob/main/src/gpuhunt/providers/azure.py ) ,
4857 [ lambdalabs.py] ( https://github.com/dstackai/gpuhunt/blob/main/src/gpuhunt/providers/lambdalabs.py ) .
4958- Online providers:
50- [ vultr.py] ( https://github.com/dstackai/gpuhunt/blob/main/src/gpuhunt/providers/vultr.py )
51- [ tensordock .py] ( https://github.com/dstackai/gpuhunt/blob/main/src/gpuhunt/providers/tensordock .py ) ,
59+ [ vultr.py] ( https://github.com/dstackai/gpuhunt/blob/main/src/gpuhunt/providers/vultr.py ) ,
60+ [ hotaisle .py] ( https://github.com/dstackai/gpuhunt/blob/main/src/gpuhunt/providers/hotaisle .py ) ,
5261 [ vastai.py] ( https://github.com/dstackai/gpuhunt/blob/main/src/gpuhunt/providers/vastai.py ) .
5362
5463### 1.4. Register the provider with the catalog
@@ -57,7 +66,8 @@ Add your provider in the following places:
5766- Either ` OFFLINE_PROVIDERS ` or ` ONLINE_PROVIDERS ` in ` src/gpuhunt/_internal/catalog.py ` .
5867- The ` python -m gpuhunt ` command in ` src/gpuhunt/__main__.py ` .
5968- (offline providers) The CI workflow in ` .github/workflows/catalogs.yml ` .
60- - (online providers) The default catalog in ` src/gpuhunt/_internal/default.py ` .
69+ - (online providers) ` ONLINE_PROVIDER_MODULES ` in ` src/gpuhunt/_internal/default.py ` , which is what
70+ ` default_catalog() ` loads.
6171
6272### 1.5. Add data quality tests
6373
0 commit comments