Skip to content

Commit

Permalink
👷 add ingest-spacy base image
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwoerpel committed Feb 20, 2024
1 parent 4e3b1a9 commit 4d99ee0
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build ingest-file
name: Build ingest-file-base

on:
workflow_dispatch: {}
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/docker-spacy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build ingest-file-spacy

on:
workflow_dispatch: {}
push:
paths:
- Dockerfile
- .github/workflows/docker.yml

permissions:
packages: write

jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/investigativedata/ingest-file-spacy
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=sha
type=raw,value=latest
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
install: true
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push release
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile.spacy
# platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
27 changes: 27 additions & 0 deletions Dockerfile.spacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM ghcr.io/investigativedata/ingest-file-base
ENV DEBIAN_FRONTEND noninteractive

LABEL org.opencontainers.image.title "Base image with spacy models for FollowTheMoney File Ingestors"
LABEL org.opencontainers.image.licenses MIT
LABEL org.opencontainers.image.source https://github.com/investigativedata/ingest-file-spacy

# Install spaCy models
RUN pip3 install --no-cache-dir spacy

RUN python3 -m spacy download en_core_web_sm \
&& python3 -m spacy download de_core_news_sm \
&& python3 -m spacy download fr_core_news_sm \
&& python3 -m spacy download es_core_news_sm
RUN python3 -m spacy download ru_core_news_sm \
&& python3 -m spacy download pt_core_news_sm \
&& python3 -m spacy download ro_core_news_sm \
&& python3 -m spacy download mk_core_news_sm
RUN python3 -m spacy download el_core_news_sm \
&& python3 -m spacy download pl_core_news_sm \
&& python3 -m spacy download it_core_news_sm \
&& python3 -m spacy download lt_core_news_sm \
&& python3 -m spacy download nl_core_news_sm \
&& python3 -m spacy download nb_core_news_sm \
&& python3 -m spacy download da_core_news_sm
# RUN python3 -m spacy download zh_core_web_sm

0 comments on commit 4d99ee0

Please sign in to comment.