Update docker.yml #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Builder | ||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
concurrency: | ||
group: ci-${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow, github.event.pull_request.number) || github.workflow_ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
docker-serge-all-models: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Checkout submodules | ||
run: | | ||
mkdir vendor | ||
cd vendor | ||
git submodule add https://github.com/serge-chat/serge.git serge | ||
cd serge | ||
ls -l | ||
- name: Models loading | ||
run: | | ||
rm ./vendor/serge/api/src/serge/data/models.json | ||
cp ./all/models.json ./vendor/serge/api/src/serge/data/ | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Login to GHCR | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: liste | ||
run: cat ./vendor/serge/Dockerfile | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./vendor/serge | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: smartappli/serge-all-models:latest | ||
docker-serge-generic-models: | ||
runs-on: ubuntu-latest | ||
needs: docker-serge-all-models | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Checkout submodules | ||
run: | | ||
mkdir vendor | ||
cd vendor | ||
git submodule add https://github.com/serge-chat/serge.git serge | ||
cd serge | ||
ls -l | ||
- name: Models loading | ||
run: | | ||
rm ./vendor/serge/api/src/serge/data/models.json | ||
cp ./generic/models.json ./vendor/serge/api/src/serge/data/ | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Login to GHCR | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./vendor/serge | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: smartappli/serge-generic-models:latest | ||
docker-serge-tiny-models: | ||
runs-on: ubuntu-latest | ||
needs: docker-serge-generic-models | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Checkout submodules | ||
run: | | ||
mkdir vendor | ||
cd vendor | ||
git submodule add https://github.com/serge-chat/serge.git serge | ||
cd serge | ||
ls -l | ||
- name: Models loading | ||
run: | | ||
rm ./vendor/serge/api/src/serge/data/models.json | ||
cp ./tiny/models.json ./vendor/serge/api/src/serge/data/ | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Login to GHCR | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./vendor/serge | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: smartappli/serge-tiny-models:latest | ||
docker-serge-small-models: | ||
runs-on: ubuntu-latest | ||
needs: docker-serge-tiny-models | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Checkout submodules | ||
run: | | ||
mkdir vendor | ||
cd vendor | ||
git submodule add https://github.com/serge-chat/serge.git serge | ||
cd serge | ||
ls -l | ||
- name: Models loading | ||
run: | | ||
rm ./vendor/serge/api/src/serge/data/models.json | ||
cp ./small/models.json ./vendor/serge/api/src/serge/data/ | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Login to GHCR | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./vendor/serge | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: smartappli/serge-small-models:latest | ||
docker-serge-medium-models: | ||
runs-on: ubuntu-latest | ||
needs: docker-serge-small-models | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Checkout submodules | ||
run: | | ||
mkdir vendor | ||
cd vendor | ||
git submodule add https://github.com/serge-chat/serge.git serge | ||
cd serge | ||
ls -l | ||
- name: Models loading | ||
run: | | ||
rm ./vendor/serge/api/src/serge/data/models.json | ||
cp ./medium/models.json ./vendor/serge/api/src/serge/data/ | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Login to GHCR | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./vendor/serge | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: smartappli/serge-medium-models:latest | ||
docker-serge-large-models: | ||
runs-on: ubuntu-latest | ||
needs: docker-serge-medium-models | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Checkout submodules | ||
run: | | ||
mkdir vendor | ||
cd vendor | ||
git submodule add https://github.com/serge-chat/serge.git serge | ||
cd serge | ||
ls -l | ||
- name: Models loading | ||
run: | | ||
rm ./vendor/serge/api/src/serge/data/models.json | ||
cp ./large/models.json ./vendor/serge/api/src/serge/data/ | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Login to GHCR | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./vendor/serge | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: smartappli/serge-large-models:latest | ||
docker-serge-coder-models: | ||
runs-on: ubuntu-latest | ||
needs: docker-serge-large-models | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Checkout submodules | ||
run: | | ||
mkdir vendor | ||
cd vendor | ||
git submodule add https://github.com/serge-chat/serge.git serge | ||
cd serge | ||
ls -l | ||
- name: Models loading | ||
run: | | ||
rm ./vendor/serge/api/src/serge/data/models.json | ||
cp ./coder/models.json ./vendor/serge/api/src/serge/data/ | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Login to GHCR | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./vendor/serge | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: smartappli/serge-coder-models:latest | ||
docker-serge-finance-models: | ||
runs-on: ubuntu-latest | ||
needs: docker-serge-coder-models | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Checkout submodules | ||
run: | | ||
mkdir vendor | ||
cd vendor | ||
git submodule add https://github.com/serge-chat/serge.git serge | ||
cd serge | ||
ls -l | ||
- name: Models loading | ||
run: | | ||
rm ./vendor/serge/api/src/serge/data/models.json | ||
cp ./finance/models.json ./vendor/serge/api/src/serge/data/ | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Login to GHCR | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./vendor/serge | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: smartappli/serge-finance-models:latest | ||
docker-serge-math-models: | ||
runs-on: ubuntu-latest | ||
needs: docker-serge-finance-models | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Checkout submodules | ||
run: | | ||
mkdir vendor | ||
cd vendor | ||
git submodule add https://github.com/serge-chat/serge.git serge | ||
cd serge | ||
ls -l | ||
- name: Models loading | ||
run: | | ||
rm ./vendor/serge/api/src/serge/data/models.json | ||
cp ./math/models.json ./vendor/serge/api/src/serge/data/ | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Login to GHCR | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./vendor/serge | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: smartappli/serge-math-models:latest | ||
docker-serge-medical-models: | ||
runs-on: ubuntu-latest | ||
needs: docker-serge-math-models | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Checkout submodules | ||
run: | | ||
mkdir vendor | ||
cd vendor | ||
git submodule add https://github.com/serge-chat/serge.git serge | ||
cd serge | ||
ls -l | ||
- name: Models loading | ||
run: | | ||
rm ./vendor/serge/api/src/serge/data/models.json | ||
cp ./medical/models.json ./vendor/serge/api/src/serge/data/ | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Login to GHCR | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./vendor/serge | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: smartappli/serge-medical-models:latest | ||
docker-serge-french-models: | ||
runs-on: ubuntu-latest | ||
needs: docker-serge-medical-models | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Checkout submodules | ||
run: | | ||
mkdir vendor | ||
cd vendor | ||
git submodule add https://github.com/serge-chat/serge.git serge | ||
cd serge | ||
ls -l | ||
- name: Models loading | ||
run: | | ||
rm ./vendor/serge/api/src/serge/data/models.json | ||
cp ./french/models.json ./vendor/serge/api/src/serge/data/ | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Login to GHCR | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./vendor/serge | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: smartappli/serge-french-models:latest | ||
docker-serge-german-models: | ||
runs-on: ubuntu-latest | ||
needs: docker-serge-french-models | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Checkout submodules | ||
run: | | ||
mkdir vendor | ||
cd vendor | ||
git submodule add https://github.com/serge-chat/serge.git serge | ||
cd serge | ||
ls -l | ||
- name: Models loading | ||
run: | | ||
rm ./vendor/serge/api/src/serge/data/models.json | ||
cp ./german/models.json ./vendor/serge/api/src/serge/data/ | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Login to GHCR | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./vendor/serge | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: smartappli/serge-german-models:latest | ||
docker-serge-italian-models: | ||
runs-on: ubuntu-latest | ||
needs: docker-serge-german-models | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Checkout submodules | ||
run: | | ||
mkdir vendor | ||
cd vendor | ||
git submodule add https://github.com/serge-chat/serge.git serge | ||
cd serge | ||
ls -l | ||
- name: Models loading | ||
run: | | ||
rm ./vendor/serge/api/src/serge/data/models.json | ||
cp ./italian/models.json ./vendor/serge/api/src/serge/data/ | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Login to GHCR | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./vendor/serge | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: smartappli/ | ||
serge-italian-models:latest | ||
docker-serge-spanish-models: | ||
runs-on: ubuntu-latest | ||
needs: docker-serge-italian-models | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Checkout submodules | ||
run: | | ||
mkdir vendor | ||
cd vendor | ||
git submodule add https://github.com/serge-chat/serge.git serge | ||
cd serge | ||
ls -l | ||
- name: Models loading | ||
run: | | ||
rm ./vendor/serge/api/src/serge/data/models.json | ||
cp ./spanish/models.json ./vendor/serge/api/src/serge/data/ | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Login to GHCR | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./vendor/serge | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: smartappli/serge-spanish-models:latest |