Update runpod setup

pull/1070/head
bmaltais 2023-06-25 11:03:32 -04:00
parent 629819e408
commit 9be16517d8
2 changed files with 30 additions and 6 deletions

View File

@ -0,0 +1,22 @@
command_file: null
commands: null
compute_environment: LOCAL_MACHINE
deepspeed_config: {}
distributed_type: 'NO'
downcast_bf16: 'no'
dynamo_backend: 'NO'
fsdp_config: {}
gpu_ids: all
machine_rank: 0
main_process_ip: null
main_process_port: null
main_training_function: main
megatron_lm_config: {}
mixed_precision: 'no'
num_machines: 1
num_processes: 1
rdzv_backend: static
same_network: true
tpu_name: null
tpu_zone: null
use_cpu: false

View File

@ -1,10 +1,10 @@
#!/usr/bin/env bash
# This gets the directory the script is run from so pathing can work relative to the script where needed.
SCRIPT_DIR="$(cd -- $(dirname -- "$0") && pwd)"
SCRIPT_DIR="$(cd -- "$(dirname -- "$0")" && pwd)"
# Install tk
echo "Install tk and python3.10-venv..."
# Install tk and python3.10-venv
echo "Installing tk and python3.10-venv..."
apt update -y && apt install -y python3-tk python3.10-venv
# Check if the venv folder doesn't exist
@ -14,12 +14,14 @@ if [ ! -d "$SCRIPT_DIR/venv" ]; then
fi
# Activate the virtual environment
echo "Activate venv..."
echo "Activating venv..."
source "$SCRIPT_DIR/venv/bin/activate" || exit 1
# Run setup_linux.py script with platform requirements
echo "Running setup_linux.py..."
python "$SCRIPT_DIR/setup/setup_linux.py" --platform-requirements-file=requirements_runpod.txt
# Configure accelerate
echo "Accelerate config..."
accelerate config
echo "Configuring accelerate..."
cp "$SCRIPT_DIR/config_files/accelerate/runpod.yaml" "/root/.cache/huggingface/accelerate/default_config.yaml"
echo "To manually configure accelerate run: $SCRIPT_DIR/venv/bin/activate"