forked from swift-nav/libsbp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.arm
150 lines (129 loc) · 4.89 KB
/
Dockerfile.arm
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
FROM swiftnav/llvm-arm-stretch:2019.09.19
ARG JOBS=8
RUN [ "cross-build-start" ]
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /work
RUN \
echo '>>> Setting up ARM build environment...' \
&& apt-get update \
&& apt-get install -y wget bzip2 build-essential python3 \
&& apt-get install -y build-essential tk-dev libncurses5-dev libncursesw5-dev \
libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev \
libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev \
libffi-dev cmake ccache binutils-dev ninja-build \
gperf gawk flex bison ncurses-dev m4 patchelf \
texinfo help2man libpthread-stubs0-dev libtinfo-dev \
libatlas-base-dev libsqlite3-dev tk-dev libgdbm-dev \
libc6-dev
RUN \
echo '>>> Downlading get-pip.py...' \
&& wget -O /tmp/get-pip.py https://bootstrap.pypa.io/get-pip.py
ENV PY27=2.7.18
ENV PY27_URL=https://www.python.org/ftp/python/${PY27}/Python-${PY27}.tar.xz
RUN \
echo '>>> Downlading Python 2.7...' \
&& wget -O /tmp/python${PY27}.txz ${PY27_URL}
RUN \
echo '>>> Building Python 2.7...' \
\
&& mkdir /tmp/python${PY27}-build && cd /tmp/python${PY27}-build \
&& tar -xJf /tmp/python${PY27}.txz \
&& cd Python-${PY27} \
&& ./configure --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib" \
&& make -j${JOBS} \
&& make altinstall \
&& cd /work \
\
&& /usr/local/bin/python2.7 /tmp/get-pip.py \
&& /usr/local/bin/python2.7 -m pip install --upgrade pip \
&& /usr/local/bin/python2.7 -m pip install wheel setuptools
ENV PY27MU=2.7.18-cp27mu
ENV CP27MU_PREFIX=/opt/cp27mu
RUN \
echo '>>> Building Python 2.7 (cp27mu)...' \
\
&& mkdir /tmp/python${PY27MU}-build && cd /tmp/python${PY27MU}-build \
&& tar -xJf /tmp/python${PY27}.txz \
&& cd Python-${PY27} \
&& ./configure \
--enable-unicode=ucs4 \
--prefix=${CP27MU_PREFIX} \
&& make -j${JOBS} \
&& make altinstall \
&& cd /work \
\
&& ${CP27MU_PREFIX}/bin/python2.7 /tmp/get-pip.py \
&& ${CP27MU_PREFIX}/bin/python2.7 -m pip install --upgrade pip \
&& ${CP27MU_PREFIX}/bin/python2.7 -m pip install wheel setuptools
ENV PY35=3.5.10
ENV PY35_URL=https://www.python.org/ftp/python/${PY35}/Python-${PY35}.tar.xz
RUN \
echo '>>> Building Python 3.5...' \
&& wget -O /tmp/python${PY35}.txz ${PY35_URL} \
&& mkdir /tmp/python${PY35}-build \
&& cd /tmp/python${PY35}-build \
&& tar -xJf /tmp/python${PY35}.txz \
&& cd Python-${PY35} \
&& ./configure --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib" \
&& make -j${JOBS} \
&& make altinstall \
&& cd /work \
\
&& /usr/local/bin/python3.5 -m pip install --upgrade pip \
&& /usr/local/bin/python3.5 -m pip install wheel setuptools
ENV PY36=3.6.12
ENV PY36_URL=https://www.python.org/ftp/python/${PY36}/Python-${PY36}.tar.xz
RUN \
echo '>>> Building Python 3.6...' \
&& wget -O /tmp/python${PY36}.txz ${PY36_URL} \
&& mkdir /tmp/python${PY36}-build && cd /tmp/python${PY36}-build \
&& tar -xJf /tmp/python${PY36}.txz \
&& cd Python-${PY36} \
&& ./configure --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib" \
&& make -j${JOBS} \
&& make altinstall \
&& cd /work \
\
&& /usr/local/bin/python3.6 -m pip install --upgrade pip \
&& /usr/local/bin/python3.6 -m pip install wheel setuptools
ENV PY37=3.7.8
ENV PY37_URL=https://www.python.org/ftp/python/${PY37}/Python-${PY37}.tar.xz
RUN \
echo '>>> Building Python 3.7...' \
&& wget -O /tmp/python${PY37}.txz ${PY37_URL} \
&& mkdir /tmp/python${PY37}-build && cd /tmp/python${PY37}-build \
&& tar -xJf /tmp/python${PY37}.txz \
&& cd Python-${PY37} \
&& ./configure --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib" \
&& make -j${JOBS} \
&& make altinstall \
&& cd /work \
&& /usr/local/bin/python3.7 -m pip install --upgrade pip \
&& /usr/local/bin/python3.7 -m pip install wheel setuptools
ENV PY38=3.8.5
ENV PY38_URL=https://www.python.org/ftp/python/${PY38}/Python-${PY38}.tar.xz
RUN \
echo '>>> Building Python 3.8...' \
&& wget -O /tmp/python${PY38}.txz ${PY38_URL} \
&& mkdir /tmp/python${PY38}-build && cd /tmp/python${PY38}-build \
&& tar -xJf /tmp/python${PY38}.txz \
&& cd Python-${PY38} \
&& ./configure --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib" \
&& make -j${JOBS} \
&& make altinstall \
&& cd /work \
&& /usr/local/bin/python3.8 -m pip install --upgrade pip \
&& /usr/local/bin/python3.8 -m pip install wheel setuptools
RUN \
rm /tmp/python${PY27}.txz \
&& rm -rf /tmp/python${PY27}-build \
&& rm /tmp/python${PY35}.txz \
&& rm -rf /tmp/python${PY35}-build \
&& rm /tmp/python${PY36}.txz \
&& rm -rf /tmp/python${PY36}-build \
&& rm /tmp/python${PY37}.txz \
&& rm -rf /tmp/python${PY37}-build \
&& rm /tmp/python${PY38}.txz \
&& rm -rf /tmp/python${PY38}-build \
&& rm /tmp/get-pip.py
RUN [ "cross-build-end" ]