Skip to content

Commit a16373a

Browse files
Spaskichspas
andauthored
Update Dockerfile to work as a web server (#120)
* Update Dockerfile to work as a web server * removed Slovak Co-authored-by: spas <[email protected]>
1 parent db56138 commit a16373a

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

docker/Dockerfile

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM ubuntu
2-
2+
ENV DEBIAN_FRONTEND noninteractive
33

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

1717
# Installing DyNET
18-
RUN mkdir dynet-base && \
19-
cd dynet-base && \
20-
git clone https://github.com/clab/dynet.git && \
21-
hg clone https://bitbucket.org/eigen/eigen -r b2e267d && \
22-
cd dynet && \
23-
mkdir build && \
24-
cd build && \
25-
cmake .. -DEIGEN3_INCLUDE_DIR=../../eigen -DPYTHON=/usr/bin/python3 -DMKL_ROOT=/opt/intel/mkl && \
26-
make -j 2 && \
27-
cd python && \
28-
python3 ../../setup.py build --build-dir=.. --skip-build install
18+
RUN pip3 install dynet
2919

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

4434
# Prepare notebook
4535
RUN pip3 install jupyter
36+
RUN pip3 install Flask
37+
RUN pip3 install bs4
4638

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

0 commit comments

Comments
 (0)