Skip to content

Commit

Permalink
- [Server Docker]: For dstackai/dstack-stgn, require the `DSTACK_VE…
Browse files Browse the repository at this point in the history
…RSION` environment variable

- [GitHub Actions]: Pass the `DSTACK_VERSION` environment variable when restarting the Hugging Face Space
  • Loading branch information
peterschmidt85 committed Aug 16, 2023
1 parent 4e20a67 commit 8f70cb3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,9 @@ jobs:
steps:
- name: Restart the `dstack-stgn` Space
run: |
VERSION=$((${{ github.run_number }} + 150))
pip install huggingface_hub
python -c "from huggingface_hub import HfApi; hf_api = HfApi(); hf_api.pause_space('dstackai/dstack-stgn'); hf_api.restart_space('dstackai/dstack-stgn');"
python -c "from huggingface_hub import HfApi; hf_api = HfApi(); hf_api.add_space_secret('dstackai/dstack-stgn', 'DSTACK_VERSION', '$VERSION'); hf_api.pause_space('dstackai/dstack-stgn'); hf_api.restart_space('dstackai/dstack-stgn');"
runner-test-master:
defaults:
Expand Down
3 changes: 3 additions & 0 deletions docker/hub/release/entry-point.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/bin/bash
set -e

if [ -n "${GOOGLE_APPLICATION_CREDENTIALS_JSON}" ]; then
GOOGLE_APPLICATION_CREDENTIALS_DIR="${HOME}/.config/gcloud/"
mkdir -p "${GOOGLE_APPLICATION_CREDENTIALS_DIR}"
Expand Down
5 changes: 4 additions & 1 deletion docker/hub/stgn/entry-point.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
pip3 install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple "dstack[all]" --upgrade --progress-bar off
#!/bin/bash
set -e

pip3 install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple "dstack[all]==$DSTACK_VERSION" --progress-bar off

if [ -n "${GOOGLE_APPLICATION_CREDENTIALS_JSON}" ]; then
GOOGLE_APPLICATION_CREDENTIALS_DIR="${HOME}/.config/gcloud/"
Expand Down

0 comments on commit 8f70cb3

Please sign in to comment.