-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·47 lines (40 loc) · 1.24 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
# Script to setup your local environment with everything you need to run Llama2 locally using Docker and a specified model weight
#
# Parameters
#
# $1 - MODEL_WEIGHT - What Llama 2 model weight to use
. ./shared.sh
# Validate inputs
check_supported_model_weight
echo "Setting Up Using The $MODEL_WEIGHT Model Weight..."
# Validate git lfs
echo "Checking For git lfs..."
if git lfs > /dev/null
then
echo "git lfs Found!"
else
echo "git lfs Not Found!"
echo "Please install git lfs"
exit 1;
fi
# See if we need to check out the llama library
if [ -d "llama" ]
then
echo "Llama repo found; skipping checking out"
else
echo "Llama repo not found; checking out..."
git clone [email protected]:facebookresearch/llama.git
echo "Llama repo checked out!"
fi
# See if we need to download the requested model weight
if [ -d $MODEL_WEIGHT ]
then
echo "Directory for $MODEL_WEIGHT model weight detected; skipping checking out"
else
echo "Directory for $MODEL_WEIGHT model weight not detected; checking out model weight repo..."
git lfs install
git clone [email protected]:meta-llama/$MODEL_WEIGHT
echo "$MODEL_WEIGHT checked out!"
fi
echo "Setup complete! Please run "./start.sh $MODEL_WEIGHT" to start your container!"