Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 95a82da

Browse files
author
Peter Izsak
authored
Merge pull request #152 from NervanaSystems/docker-fix
Update docker file
2 parents 9261033 + c159617 commit 95a82da

File tree

2 files changed

+30
-15
lines changed

2 files changed

+30
-15
lines changed

docker/Dockerfile

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
1-
FROM ubuntu
2-
RUN apt-get upgrade && apt-get update && apt-get install -y python3 python3-pip git
3-
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 10
4-
RUN pip3 install --no-cache-dir jupyter
5-
RUN useradd -ms /bin/bash nlp_user
6-
USER nlp_user
7-
WORKDIR /home/nlp_user
8-
RUN export NLP_ARCHITECT_BE=CPU
9-
RUN export LC_ALL=en_US.UTF-8
10-
RUN export LANG=en_US.UTF-8
1+
FROM ubuntu:18.04
2+
LABEL maintainer="Intel AI Lab NLP"
3+
4+
RUN apt update && \
5+
apt install -y bash build-essential ca-certificates python3 python3-pip git vim && \
6+
rm -rf /var/lib/apt/lists
7+
8+
RUN python3 -m pip install --no-cache-dir --upgrade pip setuptools && \
9+
python3 -m pip install --no-cache-dir jupyter
10+
11+
WORKDIR /workspace
1112
RUN git clone https://github.com/NervanaSystems/nlp-architect.git
12-
RUN export PYTHONPATH="$PYTHONPATH:/Users/nlp_user/nlp_architect"
13-
RUN export JUPYTER_PATH="${JUPYTER_PATH}:/Users/nlp_user/nlp_architect"
14-
WORKDIR "/home/nlp_user/nlp-architect"
15-
RUN pip3 install --no-cache-dir -e .[all,dev]
13+
RUN cd nlp-architect/ && \
14+
python3 -m pip install -e .[all,dev] && \
15+
python3 -m pip install -r server/requirements.txt && \
16+
python3 -m pip install -r examples/requirements.txt && \
17+
python3 -m pip install -r solutions/trend_analysis/requirements.txt && \
18+
python3 -m pip install -r solutions/absa_solution/requirements.txt && \
19+
python3 -m pip install -r solutions/set_expansion/requirements.txt
20+
RUN python3 -m spacy download en
21+
22+
WORKDIR /workspace/nlp-architect
23+
CMD ["/bin/bash"]
24+
1625
EXPOSE 8080
17-
EXPOSE 8888
26+
EXPOSE 8888

docker/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ To run the docker image:
88

99
`docker run -it -p 8080:8080 nlparchitect`
1010

11+
To run the demo server (NER, Intent, Dependency parsing):
12+
13+
`docker run --rm -p 8080:8080/tcp -p 8888:8888/tcp nlp-architect:latest hug -p 8080 -f server/serve.py`
14+
15+
and open your browser on - http://localhost:8080
16+
1117
To run the docker image and work with jupyter notebook:
1218

1319
'docker run -it -p 8888:8888 nlparchitect /bin/bash'

0 commit comments

Comments
 (0)