Files
agenx-lora-training/deploy-agenx-lora.sh
2026-06-30 15:31:13 -04:00

40 lines
958 B
Bash

#!/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 ""