forked from commonsense/conceptnet5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
60 lines (38 loc) · 1.21 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
FROM ubuntu:20.04 as base
LABEL maintainer="mmachado@ibm.com"
LABEL description="This is a custom Docker Image for Conceptnet 5."
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update
#basics
RUN apt-get install git curl wget unzip build-essential -y
# python
RUN apt-get install python3-pip python3-dev -y
#etc
RUN apt-get install postgresql-client -y
RUN apt-get install zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev -y
RUN apt-get install libreadline-dev libbz2-dev libsqlite3-dev liblzma-dev lzma -y
# Conceptnet required libs
RUN apt-get install libhdf5-dev libmecab-dev mecab-ipadic-utf8 -y
RUN pip install -U pip
RUN pip install pytest PyLD language_data wheel ipadic
RUN pip install uWSGI==2.0.17.1
# Install conceptnet
WORKDIR "/"
COPY . /usr/src
WORKDIR /usr/src
RUN mkdir data
RUN pip install -e .
RUN pip install -e '.[vectors]'
RUN pip install -e web
EXPOSE 8084
FROM base as debug
RUN pip install debugpy
# Keeps Python from generating .pyc files in the container
ENV PYTHONDONTWRITEBYTECODE 1
# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED 1
FROM base as prod
# STANDALONE MODE
#CMD python3 web/conceptnet_web/api.py
# THREADED MODE
CMD /bin/bash runner.sh