From eda25b303ebd2a1b257149bcd040e05dbc8c885b Mon Sep 17 00:00:00 2001 From: Elias Bouassaba Date: Thu, 13 Jun 2024 16:12:24 +0200 Subject: [PATCH] fix(ci): adjust Dockerfiles to fix GitHub Actions build errors --- conversion/Dockerfile | 2 ++ language/Dockerfile | 6 ------ language/app.py | 14 +++++++------- mosaic/Dockerfile | 4 ++-- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/conversion/Dockerfile b/conversion/Dockerfile index 845e6607b..81a49a000 100644 --- a/conversion/Dockerfile +++ b/conversion/Dockerfile @@ -9,6 +9,8 @@ RUN go build -o voltaserve-conversion FROM mcr.microsoft.com/playwright:jammy AS runner +RUN apt-get update +RUN apt-get install software-properties-common RUN add-apt-repository universe RUN apt-get update diff --git a/language/Dockerfile b/language/Dockerfile index 8351026fb..421d2eda0 100644 --- a/language/Dockerfile +++ b/language/Dockerfile @@ -15,12 +15,6 @@ RUN pip3 install torch==2.3.1 ENV PIP_DEFAULT_TIMEOUT=900 RUN poetry run spacy download xx_ent_wiki_sm -RUN poetry run spacy download zh_core_web_trf -RUN poetry run spacy download de_core_news_lg -RUN poetry run spacy download en_core_web_trf -RUN poetry run spacy download fr_core_news_lg -RUN poetry run spacy download pt_core_news_lg -RUN poetry run spacy download es_core_news_lg ENTRYPOINT ["poetry", "run", "flask", "run", "--host=0.0.0.0", "--port=8084"] diff --git a/language/app.py b/language/app.py index a25180204..045bc4c5a 100644 --- a/language/app.py +++ b/language/app.py @@ -14,18 +14,18 @@ nlp = None iso_6393_to_model = { "ara": "xx_ent_wiki_sm", - "chi_sim": "zh_core_web_trf", - "chi_tra": "zh_core_web_trf", - "deu": "de_core_news_lg", - "eng": "en_core_web_trf", - "fra": "fr_core_news_lg", + "chi_sim": "xx_ent_wiki_sm", + "chi_tra": "xx_ent_wiki_sm", + "deu": "xx_ent_wiki_sm", + "eng": "xx_ent_wiki_sm", + "fra": "xx_ent_wiki_sm", "hin": "xx_ent_wiki_sm", "ita": "xx_ent_wiki_sm", "jpn": "xx_ent_wiki_sm", "nld": "xx_ent_wiki_sm", - "por": "pt_core_news_lg", + "por": "xx_ent_wiki_sm", "rus": "xx_ent_wiki_sm", - "spa": "es_core_news_lg", + "spa": "xx_ent_wiki_sm", "swe": "xx_ent_wiki_sm", } diff --git a/mosaic/Dockerfile b/mosaic/Dockerfile index f5e01f594..6fc60718c 100644 --- a/mosaic/Dockerfile +++ b/mosaic/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /src @@ -9,7 +9,7 @@ COPY . . RUN dotnet build "mosaic.csproj" -c Release -o /build RUN dotnet publish "mosaic.csproj" -c Release -o /publish -FROM mcr.microsoft.com/dotnet/aspnet:8.0 +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/aspnet:8.0 WORKDIR /app COPY --from=build /publish .