Use PAT to authenticate

This commit is contained in:
Niels Geens
2025-03-20 14:42:42 +01:00
parent 9a171ab622
commit 8d9d3ca576
4 changed files with 162 additions and 34 deletions

View File

@@ -8,6 +8,16 @@ if [ -z "$SIA_REPO_URL" ]; then
exit 1
fi
if [ -z "$SIA_REPO_USER" ]; then
echo "Error: SIA_REPO_USER environment variable is not set"
exit 1
fi
if [ -z "$SIA_REPO_PAT" ]; then
echo "Error: SIA_REPO_PAT environment variable is not set"
exit 1
fi
# Create directory structure
echo "Creating directory structure..."
mkdir -p "/root/data/iterations"
@@ -16,7 +26,7 @@ mkdir -p "/root/venvs"
# Clone SIA repository
echo "Cloning SIA repository..."
[ ! -d "/root/sia" ] && git clone "$SIA_REPO_URL" "/root/sia"
[ ! -d "/root/sia" ] && git clone "https://$SIA_REPO_USER:$SIA_REPO_PAT@${SIA_REPO_URL#https://}" "/root/sia"
# Fixing permissions
echo "Fixing permissions..."
@@ -39,7 +49,7 @@ npm run build
ln -s "/root/sia/web/dist" "/root/static"
# Install SIA dependencies
"/root/sia/scripts/install.sh"
source "/root/sia/scripts/install.sh"
# Finetune model
echo "Finetuning model..."