Compare commits
7 Commits
main
...
sdk-versioning
| Author | SHA1 | Date | |
|---|---|---|---|
| 5330039cbf | |||
| fe999dfd16 | |||
| 85707af107 | |||
| 82023f1cfb | |||
| 5f9580dde2 | |||
| 0b02f31aa8 | |||
| 3e8da87ce2 |
+18
-6
@@ -47,20 +47,32 @@ JSON
|
||||
}
|
||||
|
||||
function install_vastai_sdk() {
|
||||
# If SDK_BRANCH is set, install vastai-sdk from the vast-sdk repo at that branch/tag/commit.
|
||||
if [ -n "${SDK_BRANCH:-}" ]; then
|
||||
if [ -n "${SDK_VERSION:-}" ]; then
|
||||
echo "WARNING: Both SDK_BRANCH and SDK_VERSION are set; using SDK_BRANCH=${SDK_BRANCH}"
|
||||
fi
|
||||
echo "Installing vastai-sdk from https://github.com/vast-ai/vast-sdk/ @ ${SDK_BRANCH}"
|
||||
if ! uv pip install "vastai-sdk @ git+https://github.com/vast-ai/vast-sdk.git@${SDK_BRANCH}"; then
|
||||
report_error_and_exit "Failed to install vastai-sdk from vast-ai/vast-sdk@${SDK_BRANCH}"
|
||||
fi
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [ -n "${SDK_VERSION:-}" ]; then
|
||||
echo "Installing vastai-sdk version ${SDK_VERSION}"
|
||||
if ! uv pip install "vastai-sdk==${SDK_VERSION}"; then
|
||||
report_error_and_exit "Failed to install vastai-sdk==${SDK_VERSION}"
|
||||
fi
|
||||
else
|
||||
echo "Installing default vastai-sdk"
|
||||
if ! uv pip install vastai-sdk; then
|
||||
report_error_and_exit "Failed to install vastai-sdk"
|
||||
fi
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo "Installing default vastai-sdk"
|
||||
if ! uv pip install vastai-sdk; then
|
||||
report_error_and_exit "Failed to install vastai-sdk"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
[ -n "$BACKEND" ] && [ -z "$HF_TOKEN" ] && report_error_and_exit "HF_TOKEN must be set when BACKEND is set!"
|
||||
[ -z "$CONTAINER_ID" ] && report_error_and_exit "CONTAINER_ID must be set!"
|
||||
[ "$BACKEND" = "comfyui" ] && [ -z "$COMFY_MODEL" ] && report_error_and_exit "For comfyui backends, COMFY_MODEL must be set!"
|
||||
|
||||
Reference in New Issue
Block a user