mirror of
https://github.com/meta-llama/llama-stack.git
synced 2026-01-02 17:20:02 +00:00
tmp dockerfile_only flag
This commit is contained in:
parent
91907b714e
commit
4747c844a2
3 changed files with 35 additions and 6 deletions
|
|
@ -102,7 +102,9 @@ def print_pip_install_help(providers: Dict[str, List[Provider]]):
|
|||
print()
|
||||
|
||||
|
||||
def build_image(build_config: BuildConfig, build_file_path: Path):
|
||||
def build_image(
|
||||
build_config: BuildConfig, build_file_path: Path, dockerfile_only: bool = False
|
||||
):
|
||||
docker_image = build_config.distribution_spec.docker_image or "python:3.10-slim"
|
||||
|
||||
normal_deps, special_deps = get_provider_dependencies(
|
||||
|
|
@ -121,6 +123,7 @@ def build_image(build_config: BuildConfig, build_file_path: Path):
|
|||
str(build_file_path),
|
||||
str(BUILDS_BASE_DIR / ImageType.docker.value),
|
||||
" ".join(normal_deps),
|
||||
dockerfile_only,
|
||||
]
|
||||
elif build_config.image_type == ImageType.conda.value:
|
||||
script = (
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ docker_base=$2
|
|||
build_file_path=$3
|
||||
host_build_dir=$4
|
||||
pip_dependencies=$5
|
||||
dockerfile_only=$7
|
||||
|
||||
# Define color codes
|
||||
RED='\033[0;31m'
|
||||
|
|
@ -146,6 +147,8 @@ ENTRYPOINT ["python", "-m", "llama_stack.distribution.server.server", "--templat
|
|||
EOF
|
||||
|
||||
printf "Dockerfile created successfully in $TEMP_DIR/Dockerfile\n\n"
|
||||
cp "$TEMP_DIR/Dockerfile" "./Dockerfile"
|
||||
printf "Dockerfile saved to ./Dockerfile\n\n"
|
||||
cat $TEMP_DIR/Dockerfile
|
||||
printf "\n"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue