Skip to content

Commit

Permalink
Make optional deps selection work with also fastText
Browse files Browse the repository at this point in the history
  • Loading branch information
juhoinkinen committed Dec 21, 2021
1 parent ad87d2b commit 38adcf8
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ FROM python:3.8-slim-bullseye AS builder

LABEL maintainer="Juho Inkinen <juho.inkinen@helsinki.fi>"

# Install fastText, which needs to be built, and therefore also some system packages:
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
&& pip install --no-cache-dir \
fasttext==0.9.2
SHELL ["/bin/bash", "-c"]
ARG optional_dependencies=dev,voikko,pycld3,fasttext,nn,omikuji,yake
# Bulding fastText needs some system packages
RUN if [[ $optional_dependencies =~ "fasttext" ]]; then \
apt-get update && \
apt-get install -y --no-install-recommends \
build-essential && \
pip install --no-cache-dir \
fasttext==0.9.2; \
fi


FROM python:3.8-slim-bullseye
Expand Down

0 comments on commit 38adcf8

Please sign in to comment.