-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_wandb.sh
executable file
·23 lines (17 loc) · 744 Bytes
/
setup_wandb.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
# Create wandb directories
mkdir -p ~/wandb/data ~/wandb/cache ~/wandb/config
# Set and export the environment variables
echo "Exporting wandb environment variables..."
export WANDB_DIR=~/wandb/data
export WANDB_CACHE_DIR=~/wandb/cache
export WANDB_CONFIG_DIR=~/wandb/config
# Ensure write permissions for the wandb directories
echo "Setting permissions for wandb directories..."
chmod -R 755 ~/wandb
# Add the exports to bashrc to persist the variables across sessions
echo "Persisting the environment variables to ~/.bashrc..."
echo 'export WANDB_DIR=~/wandb/data' >> ~/.bashrc
echo 'export WANDB_CACHE_DIR=~/wandb/cache' >> ~/.bashrc
echo 'export WANDB_CONFIG_DIR=~/wandb/config' >> ~/.bashrc
echo "Wandb setup completed!"