Skip to content

Commit

Permalink
fix: SPACES_CREATOR_USER_ID -> SPACE_CREATOR_USER_ID (#5590)
Browse files Browse the repository at this point in the history
# Description
<!-- Please include a summary of the changes and the related issue.
Please also include relevant motivation and context. List any
dependencies that are required for this change. -->

The env var had a slightly different name `SPACE_CREATOR_USER_ID`:
https://huggingface.co/docs/hub/en/spaces-overview#helper-environment-variables

Closes NA

**Type of change**
<!-- Please delete options that are not relevant. Remember to title the
PR according to the type of change -->

- Bug fix (non-breaking change which fixes an issue)

**How Has This Been Tested**
<!-- Please add some reference about how your feature has been tested.
-->

**Checklist**
<!-- Please go over the list and make sure you've taken everything into
account -->

- I added relevant documentation
  • Loading branch information
davidberenstein1957 authored Oct 10, 2024
1 parent e43c9bf commit 90e33ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion argilla-server/docker/argilla-hf-spaces/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Whether you are working on monitoring and improving complex **generative tasks**

Besides the common environment variables defined in docs, this Docker image provides a set of variables to simplify the server startup:

- `USERNAME`: If provided, the owner username. This can be combined with HF OAuth to define the argilla server owner (Default to `$SPACE_AUTHOR_NAME`).
- `USERNAME`: If provided, the owner username. This can be combined with HF OAuth to define the argilla server owner (Default to `$SPACE_CREATOR_USER_ID` or `$SPACE_AUTHOR_NAME`).

- `PASSWORD`: If provided, the owner password. If `USERNAME` and `PASSWORD` are provided, the owner user will be created with these credentials on the server startup (Default: `""`).

Expand Down
2 changes: 1 addition & 1 deletion argilla-server/docker/argilla-hf-spaces/scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export OAUTH2_HUGGINGFACE_SCOPE=$OAUTH_SCOPES

# Set the space creator name as username if no name is provided, if the user is not found, use the provided space author name
# See https://huggingface.co/docs/hub/en/spaces-overview#helper-environment-variables for more details
DEFAULT_USERNAME=$(curl -L -s https://huggingface.co/api/users/${SPACES_CREATOR_USER_ID}/overview | jq -r '.user' || echo "${SPACE_AUTHOR_NAME}")
DEFAULT_USERNAME=$(curl -L -s https://huggingface.co/api/users/${SPACE_CREATOR_USER_ID}/overview | jq -r '.user' || echo "${SPACE_AUTHOR_NAME}")
export USERNAME="${USERNAME:-$DEFAULT_USERNAME}"
DEFAULT_PASSWORD=$(pwgen -s 16 1)
export PASSWORD="${PASSWORD:-$DEFAULT_PASSWORD}"
Expand Down

0 comments on commit 90e33ad

Please sign in to comment.