2023-11-28 08:01:46 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
##
|
|
|
|
## A bash script wrapper that runs the exllama server with conda
|
|
|
|
|
|
|
|
export PATH=$PATH:/opt/conda/bin
|
|
|
|
|
2024-01-06 12:32:28 +00:00
|
|
|
CONDA_ENV=petals
|
|
|
|
|
2023-11-28 08:01:46 +00:00
|
|
|
# Activate conda environment
|
|
|
|
# if source is available use it, or use conda
|
|
|
|
#
|
|
|
|
if [ -f /opt/conda/bin/activate ]; then
|
2024-01-06 12:32:28 +00:00
|
|
|
source activate $CONDA_ENV
|
2023-11-28 08:01:46 +00:00
|
|
|
else
|
|
|
|
eval "$(conda shell.bash hook)"
|
2024-01-06 12:32:28 +00:00
|
|
|
conda activate $CONDA_ENV
|
2023-11-28 08:01:46 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# get the directory where the bash script is located
|
|
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
|
|
|
|
|
|
python $DIR/backend_petals.py $@
|