mirror of
https://github.com/fauxpilot/fauxpilot.git
synced 2025-08-20 21:34:13 -07:00
Simplify config
This commit is contained in:
parent
6739b7c53d
commit
ed1d877b7c
1 changed files with 21 additions and 21 deletions
14
setup.sh
14
setup.sh
|
@ -71,16 +71,14 @@ echo "GPUS=${GPUS%?}" >> .env
|
||||||
if [ -d "$MODEL_DIR"/"${MODEL}"-"${NUM_GPUS}"gpu ]; then
|
if [ -d "$MODEL_DIR"/"${MODEL}"-"${NUM_GPUS}"gpu ]; then
|
||||||
echo "Converted model for ${MODEL}-${NUM_GPUS}gpu already exists."
|
echo "Converted model for ${MODEL}-${NUM_GPUS}gpu already exists."
|
||||||
read -rp "Do you want to re-use it? y/n: " REUSE_CHOICE
|
read -rp "Do you want to re-use it? y/n: " REUSE_CHOICE
|
||||||
if [ "${REUSE_CHOICE^^}" = "Y" ]; then
|
if [[ ${REUSE_CHOICE:-y} =~ ^[Yy]$ ]]
|
||||||
exit 0
|
then
|
||||||
fi
|
echo "Re-using model"
|
||||||
fi
|
else
|
||||||
|
|
||||||
# Create model directory
|
# Create model directory
|
||||||
mkdir -p "${MODEL_DIR}"
|
mkdir -p "${MODEL_DIR}"
|
||||||
|
|
||||||
# For some of the models we can download it pre-converted.
|
if [ "$NUM_GPUS" -le 2 ]; then
|
||||||
if [ $NUM_GPUS -le 2 ]; then
|
|
||||||
echo "Downloading the model from HuggingFace, this will take a while..."
|
echo "Downloading the model from HuggingFace, this will take a while..."
|
||||||
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
|
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
|
||||||
DEST="${MODEL}-${NUM_GPUS}gpu"
|
DEST="${MODEL}-${NUM_GPUS}gpu"
|
||||||
|
@ -94,6 +92,8 @@ else
|
||||||
echo "Downloading and converting the model, this will take a while..."
|
echo "Downloading and converting the model, this will take a while..."
|
||||||
docker run --rm -v "${MODEL_DIR}":/models -e MODEL=${MODEL} -e NUM_GPUS="${NUM_GPUS}" moyix/model_converter:latest
|
docker run --rm -v "${MODEL_DIR}":/models -e MODEL=${MODEL} -e NUM_GPUS="${NUM_GPUS}" moyix/model_converter:latest
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
read -rp "Config complete, do you want to run FauxPilot? [y/n]" RUN
|
read -rp "Config complete, do you want to run FauxPilot? [y/n]" RUN
|
||||||
if [[ ${RUN:-y} =~ ^[Yy]$ ]]
|
if [[ ${RUN:-y} =~ ^[Yy]$ ]]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue