mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-12-31 00:57:37 +00:00
* added minimal gpu image * Update Documentation & Code Style * removed old installations * build minimal images in gh action * quotes to single quotes * switched repos * fix * fix ordering * move to deepset dockerhub acc * update nvidia/cuda image to match newest torch+cu * refactor Dockerfile-GPU-minimal to optimize build * Remove spurious doc changes from tutorial6 * install ocr dependencies and pdftotext Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Sara Zan <sarazanzo94@gmail.com> Co-authored-by: Ivan Lopez <ivan@askai.net>
66 lines
1.8 KiB
YAML
66 lines
1.8 KiB
YAML
name: docker-build
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-20.04
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- dockerfile: Dockerfile
|
|
repository: deepset/haystack-cpu
|
|
tagprefix: ''
|
|
default: true
|
|
|
|
- dockerfile: Dockerfile-GPU
|
|
repository: deepset/haystack-gpu
|
|
tagprefix: 'demo-'
|
|
default: true
|
|
|
|
- dockerfile: Dockerfile-GPU-minimal
|
|
repository: deepset/haystack-gpu
|
|
tagprefix: 'minimal-'
|
|
default: false
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Docker meta
|
|
id: meta
|
|
uses: docker/metadata-action@v3
|
|
with:
|
|
images: |
|
|
${{ matrix.repository }}
|
|
tags: |
|
|
type=ref,event=tag,prefix=${{ matrix.tagprefix }}
|
|
type=sha,format=long,prefix=${{ matrix.tagprefix }}
|
|
type=sha,format=long,prefix=,enable=${{ matrix.default }}
|
|
type=raw,value=latest,prefix=${{ matrix.tagprefix }}
|
|
type=raw,value=latest,prefix=,enable=${{ matrix.default }}
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKER_HUB_USER }}
|
|
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
|
|
|
- name: Build and push docker image
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
file: ${{ matrix.dockerfile }}
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
push: true
|
|
cache-from: type=registry,ref=${{ matrix.repository }}:latest
|
|
cache-to: type=inline
|