Skip to content

Commit

Permalink
Update Dockerfile to work as a web server (#120)
Browse files Browse the repository at this point in the history
* Update Dockerfile to work as a web server

* removed Slovak

Co-authored-by: spas <kalinov.spas@tetracom.com>
  • Loading branch information
Spaskich and spas committed Dec 15, 2020
1 parent db56138 commit a16373a
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM ubuntu

ENV DEBIAN_FRONTEND noninteractive

# Installing build dependencies
RUN apt-get update && apt-get install -y build-essential automake make cmake g++ wget git mercurial python3-pip curl
Expand All @@ -15,17 +15,7 @@ RUN wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCT
apt-get install -y intel-mkl-64bit-2018.2-046

# Installing DyNET
RUN mkdir dynet-base && \
cd dynet-base && \
git clone https://github.com/clab/dynet.git && \
hg clone https://bitbucket.org/eigen/eigen -r b2e267d && \
cd dynet && \
mkdir build && \
cd build && \
cmake .. -DEIGEN3_INCLUDE_DIR=../../eigen -DPYTHON=/usr/bin/python3 -DMKL_ROOT=/opt/intel/mkl && \
make -j 2 && \
cd python && \
python3 ../../setup.py build --build-dir=.. --skip-build install
RUN pip3 install dynet

# Prepare environment UTF-8
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y locales
Expand All @@ -43,7 +33,9 @@ RUN mkdir /work && \

# Prepare notebook
RUN pip3 install jupyter
RUN pip3 install Flask
RUN pip3 install bs4

# Start notebook
CMD cd /work/NLP-Cube/ && python3 -m "notebook" --allow-root --ip=0.0.0.0 --no-browser
# Start webserver
CMD cd /work/NLP-Cube/cube/ && python3 webserver.py --port 8080 --lang=en --lang=fr --lang=de

0 comments on commit a16373a

Please sign in to comment.