feat: add simple deploy-agenx-lora.sh script

This commit is contained in:
Christian Medina
2026-06-30 15:31:13 -04:00
parent 44939e374b
commit 11653ed743

39
deploy-agenx-lora.sh Normal file
View File

@@ -0,0 +1,39 @@
#!/bin/bash
# Simple deployment script for agenx-lora-training
# Clones repo to /opt/loras/agenx-lora-training and prepares it for training
set -e
REPO_DIR="/opt/loras/agenx-lora-training"
REPO_URL="https://gitea.cyaren.com/cmedina/agenx-lora-training.git"
echo "=== Deploying agenx-lora-training ==="
echo "Repository: ${REPO_URL}"
echo "Target: ${REPO_DIR}"
echo ""
# Create /opt/loras if it doesn't exist
if [ ! -d "/opt/loras" ]; then
echo "Creating /opt/loras..."
sudo mkdir -p /opt/loras
sudo chown $(whoami):$(whoami) /opt/loras
fi
# Clone or update repo
if [ -d "${REPO_DIR}/.git" ]; then
echo "Repository exists, updating..."
cd "${REPO_DIR}"
git pull --ff-only origin main
else
echo "Cloning repository..."
git clone "${REPO_URL}" "${REPO_DIR}"
fi
echo ""
echo "=== Done ==="
echo "Repository is at: ${REPO_DIR}"
echo ""
echo "Next steps:"
echo " cd ${REPO_DIR}"
echo " bash train-on-this-server.sh"
echo ""