serge/scripts/dev.sh
Mariusz Kogen 7f6321ae82
Fix llama-cpp-python build for Apple Silicon (#763)
* Fix llama-cpp-python build for Apple Silicon

* Make ShellCheck happy

* Make gaby happy

---------

Co-authored-by: Juan Calderon-Perez <835733+gaby@users.noreply.github.com>
2023-09-20 08:35:50 -04:00

30 lines
631 B
Bash

#!/bin/bash
set -x
# Install python dependencies
pip install -e ./api || {
echo 'Failed to install python dependencies'
exit 1
}
# Install python bindings
UNAME_M=$(dpkg --print-architecture) pip install llama-cpp-python==0.1.78 || {
echo 'Failed to install llama-cpp-python'
exit 1
}
# Start Redis instance
redis-server /etc/redis/redis.conf &
# Start the web server
cd /usr/src/app/web || exit 1
npm run dev -- --host 0.0.0.0 --port 8008 &
# Start the API
cd /usr/src/app/api || exit 1
uvicorn src.serge.main:api_app --reload --host 0.0.0.0 --port 9124 --root-path /api/ || {
echo 'Failed to start main app'
exit 1
}