fix Dockerfile after restructure (#2863)

this PR should close #2862
This commit is contained in:
Matthias Wild 2023-03-05 18:33:00 +01:00 committed by GitHub
commit 97719e40e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 12 deletions

View File

@ -4,9 +4,9 @@
!ldm !ldm
!pyproject.toml !pyproject.toml
# ignore frontend but whitelist dist # ignore frontend/web but whitelist dist
invokeai/frontend/ invokeai/frontend/web/
!invokeai/frontend/dist/ !invokeai/frontend/web/dist/
# ignore invokeai/assets but whitelist invokeai/assets/web # ignore invokeai/assets but whitelist invokeai/assets/web
invokeai/assets/ invokeai/assets/

View File

@ -9,16 +9,13 @@ on:
- 'dev/docker/*' - 'dev/docker/*'
paths: paths:
- 'pyproject.toml' - 'pyproject.toml'
- '.dockerignore'
- 'invokeai/**' - 'invokeai/**'
- 'invokeai/backend/**'
- 'invokeai/configs/**'
- 'invokeai/frontend/dist/**'
- 'docker/Dockerfile' - 'docker/Dockerfile'
tags: tags:
- 'v*.*.*' - 'v*.*.*'
workflow_dispatch: workflow_dispatch:
jobs: jobs:
docker: docker:
if: github.event.pull_request.draft == false if: github.event.pull_request.draft == false
@ -56,9 +53,9 @@ jobs:
tags: | tags: |
type=ref,event=branch type=ref,event=branch
type=ref,event=tag type=ref,event=tag
type=semver,pattern={{version}} type=pep440,pattern={{version}}
type=semver,pattern={{major}}.{{minor}} type=pep440,pattern={{major}}.{{minor}}
type=semver,pattern={{major}} type=pep440,pattern={{major}}
type=sha,enable=true,prefix=sha-,format=short type=sha,enable=true,prefix=sha-,format=short
flavor: | flavor: |
latest=${{ matrix.flavor == 'cuda' && github.ref == 'refs/heads/main' }} latest=${{ matrix.flavor == 'cuda' && github.ref == 'refs/heads/main' }}
@ -94,7 +91,7 @@ jobs:
context: . context: .
file: ${{ env.DOCKERFILE }} file: ${{ env.DOCKERFILE }}
platforms: ${{ env.PLATFORMS }} platforms: ${{ env.PLATFORMS }}
push: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/tags/*' }} push: ${{ github.ref == 'refs/heads/main' || github.ref_type == 'tag' }}
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
build-args: PIP_EXTRA_INDEX_URL=${{ matrix.pip-extra-index-url }} build-args: PIP_EXTRA_INDEX_URL=${{ matrix.pip-extra-index-url }}

View File

@ -63,7 +63,7 @@ RUN --mount=type=cache,target=${PIP_CACHE_DIR} \
# Install requirements # Install requirements
COPY --link pyproject.toml . COPY --link pyproject.toml .
COPY --link ldm/invoke/_version.py ldm/invoke/__init__.py ldm/invoke/ COPY --link invokeai/version/invokeai_version.py invokeai/version/__init__.py invokeai/version/
ARG PIP_EXTRA_INDEX_URL ARG PIP_EXTRA_INDEX_URL
ENV PIP_EXTRA_INDEX_URL ${PIP_EXTRA_INDEX_URL} ENV PIP_EXTRA_INDEX_URL ${PIP_EXTRA_INDEX_URL}
RUN --mount=type=cache,target=${PIP_CACHE_DIR} \ RUN --mount=type=cache,target=${PIP_CACHE_DIR} \