11# Hugging Face Spaces
22
33!!! info "NOTE:"
4- If you want to use ` dstack ` alone, it's enough to start the Hub server locally using
5- the [ ` dstack start ` ] ( ../reference/cli/start.md )
6- command. It will allow you to run dev environments, pipelines, and apps both locally
7- and in the cloud.
8-
9- However, if you want to work as a team and manage cloud credentials in a more secure way, you may consider
10- deploying the ` dstack ` server as a Hugging Face Space.
4+ If you run the ` dstack ` server via Docker, it will not allow you to run workloads locally.
5+ To run workloads locally, make sure to use [ ` pip ` ] ( pip.md ) .
6+
7+ Running the `dstack` server via Hugging Face Spaces makes sense only if you intend to
8+ deploy the `dstack` server outside of your machine to run workloads in the cloud.
119
1210## Create a space
1311
@@ -18,7 +16,7 @@ The easiest way to create a Space to run `dstack` is duplicating the
1816[ ` dstackai/dstack-template ` ] ( https://huggingface.co/spaces/dstackai/dstack-template ) Space template
1917by clicking the button below.
2018
21- <a href="https://huggingface.co/spaces/dstackai/dstack-template?duplicate=true "
19+ <a href="https://huggingface.co/spaces/dstackai/dstack-template?duplicate=true&visibility=public "
2220 class="md-button md-button--primary" target="_ blank">Create a Space</a >
2321
2422## Configure the settings
@@ -40,32 +38,31 @@ the required value.
4038
4139If you don't do that, dstack will generate it randomly and print it to the ` Logs ` .
4240
43- #### Persisting state
44-
45- If you want the space to maintain the state across restarts, you need to add the secrets that instruct ` dstack `
46- to persist the state in a cloud object storage of your choice.
47-
48- - ` LITESTREAM_REPLICA_URL ` - The url of the cloud object storage.
49- Examples: ` s3://<bucket-name>/<path> ` , ` gcs://<bucket-name>/<path> ` , ` abs://<storage-account>@<container-name>/<path> ` , etc.
50-
51- ??? info "AWS S3"
52- To persist state into an AWS S3 bucket, provide the following environment variables:
53-
54- - `AWS_ACCESS_KEY_ID` - The AWS access key ID
55- - `AWS_SECRET_ACCESS_KEY` - The AWS secret access key
56-
57- ??? info "GCP Storage"
58- To persist state into an AWS S3 bucket, provide one of the following environment variables:
59-
60- - `GOOGLE_APPLICATION_CREDENTIALS` - The path to the GCP service account key JSON file
61- - `GOOGLE_APPLICATION_CREDENTIALS_JSON` - The GCP service account key JSON
62-
63- ??? info "Azure Blob Storage"
64- To persist state into an Azure blog storage, provide the following environment variable.
65-
66- - `LITESTREAM_AZURE_ACCOUNT_KEY` - The Azure storage account key
67-
68- Once the settings are configured, you can restart the space and log in as an administrator. From there, you can create
69- users, projects, and configure the ` dstack ` CLI. This allows you to collaborate as a team, running development
70- environments, pipelines, and apps securely and conveniently in the cloud without the need to host the ` dstack ` server
71- yourself.
41+ ??? info "Persisting state in a cloud storage"
42+ If you want the ` dstack ` server to persist the state across restarts, you need to add the secrets that instruct ` dstack `
43+ to persist the state in a cloud object storage of your choice.
44+
45+ - ` LITESTREAM_REPLICA_URL ` - The url of the cloud object storage.
46+ Examples: ` s3://<bucket-name>/<path> ` , ` gcs://<bucket-name>/<path> ` , ` abs://<storage-account>@<container-name>/<path> ` , etc.
47+
48+ ??? info "AWS S3"
49+ To persist state into an AWS S3 bucket, provide the following environment variables:
50+
51+ - ` AWS_ACCESS_KEY_ID ` - The AWS access key ID
52+ - ` AWS_SECRET_ACCESS_KEY ` - The AWS secret access key
53+
54+ ??? info "GCP Storage"
55+ To persist state into an AWS S3 bucket, provide one of the following environment variables:
56+
57+ - ` GOOGLE_APPLICATION_CREDENTIALS ` - The path to the GCP service account key JSON file
58+ - ` GOOGLE_APPLICATION_CREDENTIALS_JSON ` - The GCP service account key JSON
59+
60+ ??? info "Azure Blob Storage"
61+ To persist state into an Azure blog storage, provide the following environment variable.
62+
63+ - ` LITESTREAM_AZURE_ACCOUNT_KEY ` - The Azure storage account key
64+
65+ Once the settings are configured, you can restart the space and log in as an administrator. From there, you can create
66+ users, projects, and configure the ` dstack ` CLI. This allows you to collaborate as a team, running development
67+ environments, pipelines, and apps securely and conveniently in the cloud without the need to host the ` dstack ` server
68+ yourself.
0 commit comments