Commit 6982fd42 authored by leszeks's avatar leszeks

Dockerfile changes

parent 80d63344
Pipeline #1758 failed with stage
in 26 seconds
FROM clarinpl/python:3.6
RUN apt-get update && apt-get install -y --no-install-recommends \
cmake \
default-jdk \
software-properties-common \
build-essential \
pwrutils \
corpus2-python3.6 \
wccl-python3.6 \
python3.6 \
python3.6-dev \
default-jdk \
libicu-dev \
libboost1.58-all-dev
......@@ -22,47 +26,35 @@ RUN apt-get update && \
ENV JAVA_HOME /opt/jdk
ENV PATH ${PATH}:${JAVA_HOME}/bin
# installing polem
# RUN cd .
# RUN rm /usr/bin/python3
# RUN ln -s /usr/bin/python3.6 /usr/bin/python3
# RUN alias python3='/usr/bin/python3.6'
#RUN apt-get -y install default-jdk
WORKDIR /home/worker
COPY ./requirements.txt .
RUN python3.6 -m pip install -r requirements.txt
WORKDIR /build/
RUN git clone https://github.com/gkubon/Polem &&\
mkdir polem/cpp/build &&\
cd polem/cpp/build &&\
mkdir Polem/build &&\
cd Polem/build &&\
cmake .. &&\
make &&\
make install
# RUN mkdir -p /build/Polem/build
# COPY . /build/Polem
# RUN rm /build/Polem/build -rf
# WORKDIR /build/Polem/build
# RUN cmake ..
# RUN make -j
# RUN make install
# RUN ldconfig
# RUN mkdir /data
# RUN mv /build/Polem/corpus /data
# WORKDIR /app
#install mewex
WORKDIR /build
RUN git clone https://github.com/MGniew/MeWeX.git
RUN cd MeWeX/mwextractor/mwextractor && \
WORKDIR /build/
RUN git clone https://gitlab.clarin-pl.eu/team-semantics/mewex && \
cd mewex/mwextractor/mwextractor && \
mkdir build && \
cd build && \
cmake .. && \
make install && \
ldconfig
RUN cd MeWeX/mewexlib/ && \
RUN cd mewex && \
mkdir mewexlib/mewexlib/data/relations/ontology &&\
mv mewexlib/mewexlib/data/relations/*.ccl mewexlib/mewexlib/data/relations/ontology
RUN cd mewex/mewexlib/ && \
python3.6 setup.py install
WORKDIR /home/worker
COPY ./src ./src
COPY ./main.py .
COPY ./requirements.txt .
RUN python3.6 -m pip install -r requirements.txt
CMD ["python3.6", "main.py", "service"]
......@@ -7,7 +7,6 @@ rabbit_user = test
rabbit_password = test
queue_prefix =nlp_
[tool]
workers_number = 4
......
......@@ -10,7 +10,7 @@ services:
- main.py
- service
volumes:
- '/samba:/samba'
- './samba:/samba'
- './config.ini:/home/worker/config.ini'
- './src:/home/worker/src'
- './main.py:/home/worker/main.py'
......
......@@ -2,6 +2,7 @@
import os
import re
import io
import pathlib
import mewexlib as mwl
......@@ -20,6 +21,7 @@ class MewexWorker(NLPWorker):
if os.path.isdir(input_path)
else (input_path,)
)
print(args['input_files'])
if not os.path.exists(output_path):
os.makedirs(output_path)
args['output_file'] = output_path+"/mewex.csv"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment