Skip to content

Commit 27b13bd

Browse files
committed
Docker build works
1 parent d1b2639 commit 27b13bd

File tree

2 files changed

+42
-28
lines changed

2 files changed

+42
-28
lines changed

Dockerfile

Lines changed: 41 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,71 @@
11
FROM linuxbrew/linuxbrew
22

33
ARG user
4+
ARG branch
5+
46
USER root
7+
58
RUN apt-get update
69
RUN apt-get -y upgrade
10+
11+
RUN apt-get install -y --no-install-recommends bsdtar
12+
RUN export tar='bsdtar'
13+
14+
# JAVA
715
RUN apt-get install -y software-properties-common
816
RUN add-apt-repository ppa:webupd8team/java
917
RUN apt-get update
1018
RUN echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-set-selections
1119
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
1520

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
1633

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
1736

37+
38+
#ML
1839
RUN git clone https://github.com/tudarmstadt-lt/GermaNER.git
1940
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
2142

2243
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
2445

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
2750

51+
#RUN echo "..........."
2852
#RUN git clone https://${user}@github.com/anon-ml/anonml-recognition-ml.git
29-
#RUN cd anonml-recognition-ml && git checkout dockerize
3053

31-
RUN apt-get install wget
3254

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
3656

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/
4164

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
4965

50-
RUN echo "12"
51-
COPY /target/recognition-ml-0.0.1-SNAPSHOT.jar anonml-recognition-ml/target/
5266

5367
EXPOSE 9003
5468

5569
COPY start.sh /
56-
ENTRYPOINT /start.sh
57-
70+
RUN ls -lh
71+
ENTRYPOINT /start.sh

start.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env bash
2-
java -Xmx4096m -Djava.security.egd=file:/dev/./urandom -jar anonml-recognition-ml/target/recognition-ml-0.0.1-SNAPSHOT.jar
2+
java -Xmx4096m -Djava.security.egd=file:/dev/./urandom -jar /recognition-machinelearning-service-0.0.1-SNAPSHOT.jar

0 commit comments

Comments
 (0)