mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-07 02:58:21 +00:00
Revert "Fix llama stack build docker creation to have correct entrypoint"
This reverts commit a8345f5f76
.
This commit is contained in:
parent
9351a4b2d7
commit
e4d9a28938
2 changed files with 6 additions and 11 deletions
|
@ -119,15 +119,12 @@ def build_image(
|
||||||
normal_deps += SERVER_DEPENDENCIES
|
normal_deps += SERVER_DEPENDENCIES
|
||||||
|
|
||||||
if build_config.image_type == ImageType.container.value:
|
if build_config.image_type == ImageType.container.value:
|
||||||
if not template_name:
|
|
||||||
raise ValueError("template_name is required for container builds")
|
|
||||||
|
|
||||||
script = str(
|
script = str(
|
||||||
importlib.resources.files("llama_stack") / "distribution/build_container.sh"
|
importlib.resources.files("llama_stack") / "distribution/build_container.sh"
|
||||||
)
|
)
|
||||||
args = [
|
args = [
|
||||||
script,
|
script,
|
||||||
template_name,
|
image_name,
|
||||||
container_image,
|
container_image,
|
||||||
str(build_file_path),
|
str(build_file_path),
|
||||||
str(BUILDS_BASE_DIR / ImageType.container.value),
|
str(BUILDS_BASE_DIR / ImageType.container.value),
|
||||||
|
|
|
@ -12,10 +12,9 @@ TEST_PYPI_VERSION=${TEST_PYPI_VERSION:-}
|
||||||
PYPI_VERSION=${PYPI_VERSION:-}
|
PYPI_VERSION=${PYPI_VERSION:-}
|
||||||
BUILD_PLATFORM=${BUILD_PLATFORM:-}
|
BUILD_PLATFORM=${BUILD_PLATFORM:-}
|
||||||
|
|
||||||
if [ "$#" -lt 5 ]; then
|
if [ "$#" -lt 4 ]; then
|
||||||
# This only works for templates
|
echo "Usage: $0 <build_name> <container_base> <pip_dependencies> [<special_pip_deps>]" >&2
|
||||||
echo "Usage: $0 <template_name> <container_base> <pip_dependencies> <host_build_dir> [<special_pip_deps>]" >&2
|
echo "Example: $0 my-fastapi-app python:3.9-slim 'fastapi uvicorn' " >&2
|
||||||
echo "Example: $0 fireworks python:3.9-slim 'fastapi uvicorn' /path/to/build/dir" >&2
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -23,7 +22,7 @@ special_pip_deps="$6"
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
template_name="$1"
|
build_name="$1"
|
||||||
container_base=$2
|
container_base=$2
|
||||||
build_file_path=$3
|
build_file_path=$3
|
||||||
host_build_dir=$4
|
host_build_dir=$4
|
||||||
|
@ -152,7 +151,7 @@ add_to_container << EOF
|
||||||
# This would be good in production but for debugging flexibility lets not add it right now
|
# This would be good in production but for debugging flexibility lets not add it right now
|
||||||
# We need a more solid production ready entrypoint.sh anyway
|
# We need a more solid production ready entrypoint.sh anyway
|
||||||
#
|
#
|
||||||
ENTRYPOINT ["python", "-m", "llama_stack.distribution.server.server", "--template", "$template_name"]
|
ENTRYPOINT ["python", "-m", "llama_stack.distribution.server.server", "--template", "$build_name"]
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
@ -184,7 +183,6 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add version tag to image name
|
# Add version tag to image name
|
||||||
build_name="distribution-$template_name"
|
|
||||||
image_tag="$build_name:$version_tag"
|
image_tag="$build_name:$version_tag"
|
||||||
|
|
||||||
# Detect platform architecture
|
# Detect platform architecture
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue