Skip to content

Commit

Permalink
Remove unnecessary builder stage
Browse files Browse the repository at this point in the history
Builder stage was needed for building fastText, which is now installed
with prebuilt wheels
  • Loading branch information
juhoinkinen committed Sep 2, 2022
1 parent 2adef96 commit 2d3e635
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,6 @@
FROM python:3.8-slim-bullseye AS builder

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

SHELL ["/bin/bash", "-c"]
ARG optional_dependencies=dev,voikko,pycld3,fasttext,nn,omikuji,yake,spacy
# 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 --upgrade pip setuptools wheel --no-cache-dir && \
pip install --no-cache-dir \
fasttext==0.9.2; \
fi


FROM python:3.8-slim-bullseye

LABEL maintainer="Juho Inkinen <juho.inkinen@helsinki.fi>"
SHELL ["/bin/bash", "-c"]
COPY --from=builder /usr/local/lib/python3.8 /usr/local/lib/python3.8

ARG optional_dependencies=dev,voikko,pycld3,fasttext,nn,omikuji,yake,spacy
# Install system dependencies needed at runtime:
Expand Down

0 comments on commit 2d3e635

Please sign in to comment.