-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.rose
91 lines (82 loc) · 2.36 KB
/
Dockerfile.rose
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Environment for ROSE compiler development.
# Pull base image.
FROM ubuntu:16.04
# Install packages.
RUN apt-get update && \
apt-get install -y \
apt-utils \
dialog \
python-software-properties \
software-properties-common && \
apt-get install -y openjdk-8-jdk && \
apt-get install -y \
autoconf \
automake \
autotools-dev \
bc \
binutils \
bison \
build-essential \
cmake \
cpufrequtils \
curl \
device-tree-compiler \
dkms \
doxygen \
flex \
gawk \
gcc-multilib \
gdb \
gfortran \
ghostscript \
git \
gperf \
graphviz \
libboost-all-dev \
libgmp-dev \
libhpdf-dev \
libmpc-dev \
libmpfr-dev \
libomp-dev \
libtool \
libxml2-dev \
patchutils \
perl-doc \
python3-dev \
sqlite \
texinfo \
unzip \
vim \
wget \
zip \
zlib1g \
zlib1g-dev && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /var/cache/*
# Setup environment
ENV ROSE_SRC /rose/rose_src
ENV ROSE_PATH /rose/rose_install
ENV ROSE_BUILD /rose/rose_build
ENV PATH $ROSE_PATH/bin:$PATH
ENV LD_LIBRARY_PATH $ROSE_PATH/lib:$LD_LIBRARY_PATH
ENV LIBRARY_PATH $ROSE_PATH/lib:$LIBRARY_PATH
# Define commonly used JAVA_HOME variable
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
ENV LD_LIBRARY_PATH $JAVA_HOME/jre/lib/amd64/server:/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
RUN mkdir -p $ROSE_PATH && \
mkdir -p $ROSE_BUILD && \
git clone https://github.com/rose-compiler/rose.git $ROSE_SRC && \
cd $ROSE_SRC && \
./build && \
cd $ROSE_BUILD && \
$ROSE_SRC/configure --prefix=$ROSE_PATH --with-boost=/usr --with-boost-libdir=/usr/lib/x86_64-linux-gnu/ --enable-languages=c,c++,fortran --enable-projects-directory --enable-tests-directory --enable-tutorial-directory --enable-edg_version=5.0 --with-gomp_omp_runtime_library=/usr/lib/gcc/x86_64-linux-gnu/5
# Compile ROSE
RUN cd $ROSE_BUILD && \
make core -j4 && \
make install-core && \
make install-tools
# Username doesn't need to be defined. The host user has to be passed into Docker for correct file permissions.
# Define working directory.
WORKDIR /rose
# Define default command.
CMD ["bash"]