mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-06 02:32:40 +00:00
test
This commit is contained in:
parent
4747c844a2
commit
d97bcaf625
3 changed files with 41 additions and 5 deletions
30
.github/workflows/publish-to-docker.yml
vendored
Normal file
30
.github/workflows/publish-to-docker.yml
vendored
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
name: Docker Build and Publish
|
||||||
|
|
||||||
|
on:
|
||||||
|
push
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Log in to the Container registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Custom build docker image
|
||||||
|
run: |
|
||||||
|
pip install --no-cache --index-url https://pypi.org/simple/ --extra-index-url https://test.pypi.org/simple/ llama-stack==0.0.63.dev20250114
|
||||||
|
TESTPYPI_VERSION=0.0.63.dev20250114 llama stack build --template ollama --image-type docker
|
||||||
|
docker images
|
|
@ -123,7 +123,7 @@ def build_image(
|
||||||
str(build_file_path),
|
str(build_file_path),
|
||||||
str(BUILDS_BASE_DIR / ImageType.docker.value),
|
str(BUILDS_BASE_DIR / ImageType.docker.value),
|
||||||
" ".join(normal_deps),
|
" ".join(normal_deps),
|
||||||
dockerfile_only,
|
str(dockerfile_only),
|
||||||
]
|
]
|
||||||
elif build_config.image_type == ImageType.conda.value:
|
elif build_config.image_type == ImageType.conda.value:
|
||||||
script = (
|
script = (
|
||||||
|
|
|
@ -18,7 +18,7 @@ if [ "$#" -lt 4 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
special_pip_deps="$6"
|
special_pip_deps="$7"
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ docker_base=$2
|
||||||
build_file_path=$3
|
build_file_path=$3
|
||||||
host_build_dir=$4
|
host_build_dir=$4
|
||||||
pip_dependencies=$5
|
pip_dependencies=$5
|
||||||
dockerfile_only=$7
|
dockerfile_only=$6
|
||||||
|
|
||||||
# Define color codes
|
# Define color codes
|
||||||
RED='\033[0;31m'
|
RED='\033[0;31m'
|
||||||
|
@ -147,8 +147,6 @@ ENTRYPOINT ["python", "-m", "llama_stack.distribution.server.server", "--templat
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
printf "Dockerfile created successfully in $TEMP_DIR/Dockerfile\n\n"
|
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
|
cat $TEMP_DIR/Dockerfile
|
||||||
printf "\n"
|
printf "\n"
|
||||||
|
|
||||||
|
@ -178,6 +176,14 @@ fi
|
||||||
# Add version tag to image name
|
# Add version tag to image name
|
||||||
image_tag="$image_name:$version_tag"
|
image_tag="$image_name:$version_tag"
|
||||||
|
|
||||||
|
if [ "$dockerfile_only" = "True" ]; then
|
||||||
|
echo "Skipping docker build as dockerfile_only=True"
|
||||||
|
dockerfile_name="Dockerfile.${image_tag}"
|
||||||
|
cp "$TEMP_DIR/Dockerfile" "./${dockerfile_name}"
|
||||||
|
printf "Dockerfile saved to ./${dockerfile_name}\n\n"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Detect platform architecture
|
# Detect platform architecture
|
||||||
ARCH=$(uname -m)
|
ARCH=$(uname -m)
|
||||||
if [ -n "$BUILD_PLATFORM" ]; then
|
if [ -n "$BUILD_PLATFORM" ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue