-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (31 loc) · 1.13 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM registry.gitlab.com/frankier/finntk/full-deb:latest
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
# Apt-get requirements
RUN apt-get update && apt-get install -y \
# Python/Poetry
python3 python3-venv python3.7 python3-pip curl wget \
# Python build requirements
python3-dev python3.7-dev build-essential libffi-dev
# Poetry
RUN curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -o get-poetry.py
RUN python3 get-poetry.py --version 1.0.0
RUN ~/.poetry/bin/poetry config virtualenvs.create false
# Fixup Python
RUN ln -sf /usr/bin/python3.7 /usr/bin/python
WORKDIR /app
# Package installation
COPY ./pyproject.toml /app/
COPY ./poetry.lock /app/
RUN pip3 install --upgrade pip==19.0.3
RUN ~/.poetry/bin/poetry install --no-interaction
# NLTK resources
RUN python -c "from nltk import download as d; d('wordnet'); d('omw'); d('punkt')"
# FinnTK resources
RUN python -m finntk.scripts.bootstrap_all
# STIFF post_install
RUN python -m stiff.scripts.post_install
# Evaluation framework setup
COPY . /app
# Set up Python path
RUN echo "/app/" > "/usr/local/lib/python3.7/dist-packages/senseclust.pth"