forked from Kolkir/code2seq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
44 lines (35 loc) · 1.25 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
FROM nvcr.io/nvidia/tensorflow:20.03-tf2-py3
ARG comment-or-not-to-comment_VERSION="1.0-SNAPSHOT"
LABEL name="ciselab/code2seq"
LABEL url="https://github.com/ciselab/code2seq"
LABEL vcs="https://github.com/ciselab/code2seq"
# Install Java
RUN apt-get update && apt-get install ca-certificates-java -y && apt install openjdk-11-jdk -y && apt install maven -y
# Copy code2seq files
COPY JavaExtractor/ /app/code2seq/JavaExtractor/
COPY *.py /app/code2seq/
COPY *.sh /app/code2seq/
COPY requirements_docker.txt /app/code2seq/
COPY cppminer/ /app/code2seq/cppminer/
COPY Input.source /app/code2seq/
# Compile JavaExtractor
WORKDIR /app/code2seq/JavaExtractor/JPredict
RUN mvn package
# Install code2seq requirements
WORKDIR /app/code2seq
RUN pip install -r requirements_docker.txt
# Default preprocess variables
ENV dataset="default"
ENV preprocess=true
ENV includeComments=true
ENV excludeStopwords=true
ENV useTfidf=true
ENV numberOfTfidfKeywords="50"
ENV variant="default"
# Training variables
ENV train=true
ENV continueTrainingFromCheckpoint=false
#Evaluation variables
#
# Entrypoints are used to run preprocessing/training in a reproducible way, as a template what to do. Defaults will be given here, changed by docker-compose.
ENTRYPOINT ["bash","./entrypoint.sh"]