forked from collab-uniba/EMTK_docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
70 lines (52 loc) · 1.7 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
61
62
63
64
65
66
67
68
69
70
FROM python:2.7
# Install Git LFS
RUN echo 'deb http://http.debian.net/debian stretch-backports main' > /etc/apt/sources.list.d/stretch-backports-main.list && \
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \
apt-get -y update && \
apt-get -y install git-lfs && \
git lfs install
# ============================================= #
# Clone the datasets and projects' repositories #
# ============================================= #
# Dataset
RUN git clone https://github.com/collab-uniba/EMTK_datasets.git datasets
# Emotions
RUN git clone https://github.com/collab-uniba/Emotion_and_Polarity_SO.git emotions
RUN wget -P /emotions/java/lib http://nlp.stanford.edu/software/stanford-corenlp-models-current.jar
# Polarity
RUN git lfs clone https://github.com/collab-uniba/Senti4SD.git polarity
# ====== #
# PYTHON #
# ====== #
# Install python requirements
COPY requirements.txt /
RUN pip install --upgrade pip && \
pip install -r /requirements.txt
RUN python -m nltk.downloader all
RUN rm requirements.txt
# ==== #
# JAVA #
# ==== #
# Install Java 8 JRE
RUN apt-get -y update && \
apt-get -y install default-jre
# ====== #
# R-base #
# ====== #
# Install R
RUN apt-get -y update && \
apt-get -y install r-base
# Install R requirements
COPY requirements.R /
RUN Rscript requirements.R
RUN rm requirements.R
# ========== #
# ENTRYPOINT #
# ========== #
# Copy the main bash script onto the image and make it a command
COPY ./emtk /
RUN cp /emotions/LOVE_SMALL.csv /emotions_sample.csv
RUN cp /polarity/ClassificationTask/Sample.csv /polarity_sample.csv
RUN ln -s /emtk /usr/bin/emtk
# Run the bash inside the container when it starts
ENTRYPOINT [ "/bin/bash" ]