mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-29 07:14:20 +00:00
avoid configure twice
This commit is contained in:
parent
204eb6d810
commit
92a255c187
2 changed files with 8 additions and 3 deletions
|
@ -8,16 +8,17 @@ from enum import Enum
|
|||
from typing import List, Optional
|
||||
|
||||
import pkg_resources
|
||||
|
||||
from llama_stack.distribution.utils.exec import run_with_pty
|
||||
from pydantic import BaseModel
|
||||
|
||||
from termcolor import cprint
|
||||
|
||||
from llama_stack.distribution.utils.exec import run_with_pty
|
||||
|
||||
from llama_stack.distribution.datatypes import * # noqa: F403
|
||||
from pathlib import Path
|
||||
|
||||
from llama_stack.distribution.distribution import api_providers, SERVER_DEPENDENCIES
|
||||
from llama_stack.distribution.utils.config_dirs import BUILDS_BASE_DIR
|
||||
|
||||
|
||||
class ImageType(Enum):
|
||||
|
@ -85,6 +86,7 @@ def build_image(build_config: BuildConfig, build_file_path: Path):
|
|||
build_config.name,
|
||||
package_deps.docker_image,
|
||||
str(build_file_path),
|
||||
str(BUILDS_BASE_DIR / ImageType.docker.value),
|
||||
" ".join(deps),
|
||||
]
|
||||
else:
|
||||
|
|
|
@ -18,7 +18,8 @@ build_name="$1"
|
|||
image_name="llamastack-$build_name"
|
||||
docker_base=$2
|
||||
build_file_path=$3
|
||||
pip_dependencies=$4
|
||||
host_build_dir=$4
|
||||
pip_dependencies=$5
|
||||
|
||||
# Define color codes
|
||||
RED='\033[0;31m'
|
||||
|
@ -134,4 +135,6 @@ set -x
|
|||
$DOCKER_BINARY build $DOCKER_OPTS -t $image_name -f "$TEMP_DIR/Dockerfile" "$REPO_DIR" $mounts
|
||||
set +x
|
||||
|
||||
mv $REPO_CONFIGS_DIR/$build_name-run.yaml $host_build_dir
|
||||
|
||||
echo "Success! You can run it with: $DOCKER_BINARY $DOCKER_OPTS run -p 5000:5000 $image_name"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue