InvokeAI/.github/workflows/build-container.yml
Matthias Wild 62b80a81d3
Update dockerfile 2.2.4 (#1924)
* updated Dockerfile
- use `python:3.10-slim` as baseimage
- separate builder and runtime stages again
- get rid of uneeded packages
- pin packages for persistence
- remove outdir from entrypoint since invoke.init is available in /data
- shrinked image size to <2GB
- way better security score than before

* small output update to build.sh and run.sh

* update matrix in build-container.yml

* remove branches from build-container.yml
2022-12-11 17:33:54 +01:00

39 lines
1.2 KiB
YAML

# Building the Image without pushing to confirm it is still buildable
# confirum functionality would unfortunately need way more resources
name: build container image
on:
push:
branches:
- 'main'
jobs:
docker:
strategy:
fail-fast: false
matrix:
pip-requirements:
- requirements-lin-amd.txt
- requirements-lin-cuda.txt
runs-on: ubuntu-latest
name: ${{ matrix.pip-requirements }} ${{ matrix.arch }}
steps:
- name: prepare docker-tag
env:
repository: ${{ github.repository }}
run: echo "dockertag=${repository,,}" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build container
uses: docker/build-push-action@v3
with:
context: .
file: docker-build/Dockerfile
platforms: linux/amd64,linux/arm64
push: false
tags: ${{ env.dockertag }}:${{ matrix.pip-requirements }}
build-args: pip_requirements=${{ matrix.pip-requirements }}