mirror of
https://github.com/fauxpilot/fauxpilot.git
synced 2025-08-20 13:24:27 -07:00
Simplify config and port handling
This commit is contained in:
parent
6f49915d2a
commit
87f4f53e27
5 changed files with 70 additions and 45 deletions
13
launch.sh
13
launch.sh
|
@ -1,11 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Read in config.env file; error if not found
|
||||
if [ ! -f config.env ]; then
|
||||
echo "config.env not found, please run setup.sh"
|
||||
exit 1
|
||||
# Read in .env file; error if not found
|
||||
if [ ! -f .env ]; then
|
||||
echo ".env not found, running setup.sh"
|
||||
bash setup.sh
|
||||
fi
|
||||
source config.env
|
||||
source .env
|
||||
|
||||
# On newer versions, docker-compose is docker compose
|
||||
DOCKER_COMPOSE=$(command -v docker-compose)
|
||||
|
@ -13,7 +13,4 @@ if [ -z "$DOCKER_COMPOSE" ]; then
|
|||
DOCKER_COMPOSE="docker compose"
|
||||
fi
|
||||
|
||||
export NUM_GPUS=${NUM_GPUS}
|
||||
export MODEL_DIR="${MODEL_DIR}"/"${MODEL}-${NUM_GPUS}gpu"
|
||||
export GPUS=$(seq 0 $(( NUM_GPUS - 1 )) | paste -sd ',')
|
||||
$DOCKER_COMPOSE up
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue