This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
/
Dockerfile
85 lines (64 loc) · 3.26 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# The MIT License (MIT)
#
# Copyright (c) 2014 Microsoft
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# Author: Mark Gottscho <[email protected]>
# Dockerfile to containerize the ability to run (but not build) X-Mem on Linux
# We prefer to base X-Mem on Ubuntu distribution
FROM ubuntu:14.04
# Set maintainer
MAINTAINER "Mark Gottscho, Email: [email protected]"
# Update repository information
RUN apt-get update
# Install vim text editor. Useful if you want to modify X-Mem code inside the container or inspect output files. However,
# the recommend way to hack X-Mem code is to do it outside the container and then rebuild the container to compile and run using modified source files.
RUN apt-get install -y vim
# Install doxygen for generating documentation on Linux
RUN apt-get install -y doxygen doxygen-latex
# Install development library to support huge/large pages.
RUN apt-get install -y libhugetlbfs-dev
# Install development library to support NUMA.
RUN apt-get install -y libnuma-dev
# Install Python 2.7
RUN apt-get install -y python2.7
# Install SCons
RUN apt-get install -y scons
# Install g++ compiler
RUN apt-get install -y g++
# Install g++ 4.7 and multilibs to build for 32-bit x86 on 64-bit x86-64 host. We cannot use same g++ version as above because the ARM cross-compiler stuff is incompatible while supporting 32-bit x86 for some reason. Ubuntu package managers will only allow one or the other.
RUN apt-get install -y g++-4.7 g++-4.7-multilib gcc-4.7 gcc-4.7-multilib
# Install gcc cross-compiler for ARM targets
RUN apt-get install -y g++-4.8-arm-linux-gnueabihf gcc-4.8-arm-linux-gnueabihf
# IMPORTANT: set X-Mem version information
ENV xmem_version 2.4.2
LABEL version=${xmem_version}
LABEL description="X-Mem: The E>X<tensible >Mem<ory Characterization Tool"
# For some reason when cross-compiling on x86-64 host for 32-bit x86, /usr/include/asm/errno.h does not exist. There is, however, /usr/include/asm-generic/errno.h. The following band-aid fix works.
RUN mkdir /usr/include/asm
RUN cp /usr/include/asm-generic/errno.h /usr/include/asm/errno.h
# Make top-level directory in container for X-Mem source tree
RUN mkdir /X-Mem
# Add X-Mem source tree to container
ADD . /X-Mem/
# Set working directory for container
WORKDIR /X-Mem
# Entrypoint
ENTRYPOINT ["/bin/bash"]