-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4e3b1a9
commit 4d99ee0
Showing
3 changed files
with
78 additions
and
1 deletion.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
.github/workflows/docker.yml → .github/workflows/docker-base.yml
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
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: {} | ||
|
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
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 |
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
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 | ||
|