mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-29 03:14:19 +00:00
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 <wenzhou@redhat.com>
This commit is contained in:
parent
cfee63bd0d
commit
9b28766842
1 changed files with 2 additions and 8 deletions
|
@ -154,12 +154,6 @@ get_python_cmd() {
|
||||||
fi
|
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
|
if [ -n "$run_config" ]; then
|
||||||
# Copy the run config to the build context since it's an absolute path
|
# Copy the run config to the build context since it's an absolute path
|
||||||
cp "$run_config" "$BUILD_CONTEXT_DIR/run.yaml"
|
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"
|
echo "Copying external providers directory: $external_providers_dir"
|
||||||
cp -r "$external_providers_dir" "$BUILD_CONTEXT_DIR/providers.d"
|
cp -r "$external_providers_dir" "$BUILD_CONTEXT_DIR/providers.d"
|
||||||
add_to_container << EOF
|
add_to_container << EOF
|
||||||
COPY providers.d /.llama/providers.d
|
COPY --chmod=g+w providers.d /.llama/providers.d
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -268,7 +262,7 @@ fi
|
||||||
# Add other require item commands genearic to all containers
|
# Add other require item commands genearic to all containers
|
||||||
add_to_container << EOF
|
add_to_container << EOF
|
||||||
|
|
||||||
RUN chmod -R g+rw /app /.llama /.cache
|
RUN chmod -R g+rw /app /.llama
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
printf "Containerfile created successfully in %s/Containerfile\n\n" "$TEMP_DIR"
|
printf "Containerfile created successfully in %s/Containerfile\n\n" "$TEMP_DIR"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue