chore: script

This commit is contained in:
2025-02-15 01:53:31 +06:00
parent fc9c04fe9c
commit 542c8e0120
3 changed files with 49 additions and 7 deletions

41
setup.sh Executable file
View File

@@ -0,0 +1,41 @@
#!/bin/sh
set -e
check_command() {
if [ $? -ne 0 ]; then
echo "Error: $1 failed"
exit 1
fi
}
cd /workspace || {
echo "Error: Cannot change to /workspace directory"
exit 1
}
echo "Cloning unsloth-train-scripts repository..."
git clone https://git.hye.su/mira/unsloth-train-scripts.git
check_command "Git clone"
echo "Downloading and running unsloth auto-install script..."
INSTALL_CMD=$(wget -qO- https://raw.githubusercontent.com/unslothai/unsloth/main/unsloth/_auto_install.py | python -)
check_command "Auto-install script"
echo "Executing installation command..."
eval "$INSTALL_CMD"
check_command "Installation command"
echo "Installing additional dependencies..."
pip install gdown wandb
check_command "pip install"
echo "Downloading dataset"
gdown --fuzzy 'https://drive.google.com/file/d/1mqhq69dsSOK7ep7trTjRd3FMagTFTrzF/view?usp=sharing'
check_command "gdown"
echo "Enter your Weights & Biases API key when prompted"
wandb login
check_command "wandb login"
echo "Setup completed successfully."