1
1
FROM linuxbrew/linuxbrew
2
2
3
3
ARG user
4
+ ARG branch
5
+
4
6
USER root
7
+
5
8
RUN apt-get update
6
9
RUN apt-get -y upgrade
10
+
11
+ RUN apt-get install -y --no-install-recommends bsdtar
12
+ RUN export tar='bsdtar'
13
+
14
+ # JAVA
7
15
RUN apt-get install -y software-properties-common
8
16
RUN add-apt-repository ppa:webupd8team/java
9
17
RUN apt-get update
10
18
RUN echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-set-selections
11
19
RUN apt-get install -y oracle-java8-installer
12
- RUN apt-get install -y git
13
- RUN apt-get install -y maven
14
- ARG user
15
20
21
+ # MONGO DB
22
+ RUN apt-get install -y dirmngr
23
+ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
24
+ RUN echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
25
+ RUN apt-get update
26
+ RUN mkdir -p /data/db
27
+ RUN apt-get install -y mongodb-org
28
+ EXPOSE 27017
29
+
30
+
31
+ # UTIL
32
+ RUN apt-get install -y git maven wget liblbfgs-dev tar build-essential
16
33
34
+ RUN git clone https://${user}@github.com/anon-ml/anonml-core.git
35
+ RUN cd anonml-core && git checkout ${branch} && mvn clean install -q -DskipTests
17
36
37
+
38
+ # ML
18
39
RUN git clone https://github.com/tudarmstadt-lt/GermaNER.git
19
40
RUN ls -lh
20
- RUN cd GermaNER/germaner && mvn clean install -Drat.skip=true
41
+ RUN cd GermaNER/germaner && mvn clean install -q - Drat.skip=true
21
42
22
43
RUN git clone https://github.com/seyyaw/cleartk.git
23
- RUN cd cleartk && mvn clean install -Drat.skip=true -Dcleartk.skipTests=svmlight -DskipTests
44
+ RUN cd cleartk && mvn clean install -q - Drat.skip=true -Dcleartk.skipTests=svmlight -DskipTests
24
45
25
- # RUN git clone https://${user}@github.com/anon-ml/anonml-core.git
26
- # RUN cd anonml-core && mvn clean install -DskipTests
46
+ USER linuxbrew
47
+ RUN brew tap homebrew/science
48
+ RUN brew install crfsuite
49
+ USER root
27
50
51
+ # RUN echo "..........."
28
52
# RUN git clone https://${user}@github.com/anon-ml/anonml-recognition-ml.git
29
- # RUN cd anonml-recognition-ml && git checkout dockerize
30
53
31
- RUN apt-get install wget
32
54
33
- # RUN cd anonml-recognition-ml && cd src/main/resources/GermaNER && wget https://github.com/tudarmstadt-lt/GermaNER/releases/download/germaNER0.9.1/data.zip
34
- # RUN touch anonml-recognition-ml/src/main/resources/GermaNER/temp-file-to-annotate.txt
35
- # RUN cd anonml-recognition-ml && mvn clean install -DskipTests
55
+ # RUN cd anonml-recognition-ml/service/src/main/resources/GermaNER && wget https://github.com/tudarmstadt-lt/GermaNER/releases/download/germaNER0.9.1/data.zip
36
56
37
- RUN apt-get install -y liblbfgs-dev
38
- RUN apt-get install -y tar
39
- RUN apt-get install -y build-essential
40
- # RUN apt-get update && apt-get install -y curl file g++ git make ruby2.3 ruby2.3-dev uuid-runtime && ln -sf ruby2.3 /usr/bin/ruby && ln -sf gem2.3 /usr/bin/gem
57
+ # RUN touch anonml-recognition-ml/service/src/main/resources/GermaNER/temp-file-to-annotate.txt
58
+ # RUN cd anonml-recognition-ml && git checkout ${branch} && mvn clean install -q -DskipTests
59
+ RUN echo "here6"
60
+ COPY /service/target/recognition-machinelearning-service-0.0.1-SNAPSHOT.jar /
61
+
62
+ RUN mkdir model
63
+ RUN mv anonml-recognition-ml/service/src/main/resources/GermaNER/ model/
41
64
42
- USER linuxbrew
43
- # RUN ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install)"
44
- # RUN PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"
45
- # RUN echo 'export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"' >>~/.bash_profile
46
- RUN brew tap homebrew/science
47
- RUN brew install crfsuite
48
- # RUN wget https://github.com/downloads/chokkan/crfsuite/crfsuite-0.12.tar.gz && tar xvzf crfsuite-0.12.tar.gz && cd crfsuite-0.12 && ./configure && make && make install
49
65
50
- RUN echo "12"
51
- COPY /target/recognition-ml-0.0.1-SNAPSHOT.jar anonml-recognition-ml/target/
52
66
53
67
EXPOSE 9003
54
68
55
69
COPY start.sh /
56
- ENTRYPOINT /start.sh
57
-
70
+ RUN ls -lh
71
+ ENTRYPOINT /start.sh
0 commit comments