Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added ..gitattributes.swp
Binary file not shown.
4 changes: 4 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ RUN pip install torchvision==0.2.1 -f https://download.pytorch.org/whl/torch_sta
RUN git clone https://github.com/UKPLab/emnlp2017-bilstm-cnn-crf.git

RUN mv backend.py emnlp2017-bilstm-cnn-crf/ && mv Model.py emnlp2017-bilstm-cnn-crf/ && mv ModelNewES.py emnlp2017-bilstm-cnn-crf/ && mv ModelNewWD.py emnlp2017-bilstm-cnn-crf/ && mv Segmenter.py emnlp2017-bilstm-cnn-crf/
# Download the .h5 file to the models directory
# Download the .h5 file
RUN wget -q --show-progress -O models/IBM.h5 "https://huggingface.co/debela-arg/segmenter/resolve/main/IBM.h5?download=true" || \
(echo "Download failed! Check URL or authentication." && exit 1)

RUN mv models/* emnlp2017-bilstm-cnn-crf/models/

Expand Down
49 changes: 49 additions & 0 deletions backend/Dockerfile2
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Use an official Python runtime as a parent image
FROM python:3.5

# Add all Data
ADD . /

# Set the working directory to /
WORKDIR /

# Install any needed packages specified in requirements.txt
RUN pip install -r requirements.txt
RUN pip install torch==0.4.1 -f https://download.pytorch.org/whl/torch_stable.html
RUN pip install torchvision==0.2.1 -f https://download.pytorch.org/whl/torch_stable.html

RUN git clone https://github.com/UKPLab/emnlp2017-bilstm-cnn-crf.git

RUN mv backend.py emnlp2017-bilstm-cnn-crf/ && mv Model.py emnlp2017-bilstm-cnn-crf/ && mv ModelNewES.py emnlp2017-bilstm-cnn-crf/ && mv ModelNewWD.py emnlp2017-bilstm-cnn-crf/ && mv Segmenter.py emnlp2017-bilstm-cnn-crf/ && mv data.py emnlp2017-bilstm-cnn-crf/ && mv main.py emnlp2017-bilstm-cnn-crf/

# Download the .h5 file to the models directory
RUN wget -O backend/models/IBM.h5 https://huggingface.co/debela-arg/segmenter/raw/main/IBM.h5


RUN mv models/* emnlp2017-bilstm-cnn-crf/models/

RUN mv -f BiLSTM.py emnlp2017-bilstm-cnn-crf/neuralnets/

RUN mkdir emnlp2017-bilstm-cnn-crf/lstm

RUN git clone https://github.com/achernodub/bilstm-cnn-crf-tagger.git emnlp2017-bilstm-cnn-crf/lstm
RUN pip install prometheus-flask-exporter==0.1.2
RUN pip install requests


# Make port 6000 available to the world outside this container
EXPOSE 6000

WORKDIR /emnlp2017-bilstm-cnn-crf

# Run app.py when the container launches
CMD ["python3", "main.py"]









3 changes: 0 additions & 3 deletions backend/models/IBM.h5

This file was deleted.