From 9b2876684223b13b1ee1befd1172d6057d760ec4 Mon Sep 17 00:00:00 2001 From: Wen Zhou Date: Mon, 23 Jun 2025 17:15:47 +0200 Subject: [PATCH] build: update temp. created Containerfile - conditionally created folder /.llama/providers.d if external_providers_dir is set - do not create /.cache folder, not in use anywhere - keep /.llama folder which will be used more than just providers.d and keep recursivly chmod Signed-off-by: Wen Zhou --- llama_stack/distribution/build_container.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/llama_stack/distribution/build_container.sh b/llama_stack/distribution/build_container.sh index 2b2ce3e81..9bb02d84b 100755 --- a/llama_stack/distribution/build_container.sh +++ b/llama_stack/distribution/build_container.sh @@ -154,12 +154,6 @@ get_python_cmd() { fi } -# Add other required item commands generic to all containers -add_to_container << EOF -# Allows running as non-root user -RUN mkdir -p /.llama/providers.d /.cache -EOF - if [ -n "$run_config" ]; then # Copy the run config to the build context since it's an absolute path cp "$run_config" "$BUILD_CONTEXT_DIR/run.yaml" @@ -175,7 +169,7 @@ if [ -n "$run_config" ]; then echo "Copying external providers directory: $external_providers_dir" cp -r "$external_providers_dir" "$BUILD_CONTEXT_DIR/providers.d" add_to_container << EOF -COPY providers.d /.llama/providers.d +COPY --chmod=g+w providers.d /.llama/providers.d EOF fi @@ -268,7 +262,7 @@ fi # Add other require item commands genearic to all containers add_to_container << EOF -RUN chmod -R g+rw /app /.llama /.cache +RUN chmod -R g+rw /app /.llama EOF printf "Containerfile created successfully in %s/Containerfile\n\n" "$TEMP_DIR"