forked from TuGraph-family/tugraph-db
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tugraph-compile-arm64v8-centos7-Dockerfile
346 lines (312 loc) · 20.4 KB
/
tugraph-compile-arm64v8-centos7-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
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
FROM arm64v8/centos:7
RUN yum update -y && yum install -y \
git \
gcc \
gcc-c++ \
make \
wget \
bzip2 \
bzip2-devel \
openssl-static \
libtool \
libtool-ltdl \
libtool-ltdl-devel \
unzip \
byacc \
libuuid-devel \
rpm-build \
rpmdevtools \
rpmdev-setuptree \
autoconf \
automake \
libtoolize \
texinfo \
java-1.8.0-openjdk* \
perl-Digest-MD5 \
kde-l10n-Chinese \
glibc-common \
libcurl-devel \
centos-release-scl-rh \
witch \
java-11-openjdk-devel
# install g++ 8.4.0
# if it is not accessible, replace it with the link below
# http://ftp.gnu.org/gnu/gcc/gcc-8.4.0/gcc-8.4.0.tar.gz
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/gcc-8.4.0.tar.gz \
&& tar -xvf gcc-8.4.0.tar.gz && cd gcc-8.4.0 \
&& ./contrib/download_prerequisites && mkdir build && cd build \
&& ../configure CFLAGS=-fPIC CXXFLAGS=-fPIC -enable-checking=release -enable-languages=c,c++ -disable-multilib \
&& make -j4 && make install \
&& cp ./aarch64-*-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6.0.25 /usr/lib64/ \
&& cd /usr/lib64 && ln -sf libstdc++.so.6.0.25 libstdc++.so.6 \
&& rm -rf /gcc-* && ln -s /usr/local/bin/gcc /usr/local/bin/cc
# install python3
# if it is not accessible, replace it with the link below
# https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tgz
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/Python-3.6.9.tgz \
&& tar xf Python-3.6.9.tgz && cd Python-3.6.9 && ./configure --prefix=/usr/local \
&& make -j4 && make install \
&& python3 -m pip install --upgrade pip -i https://pypi.antfin-inc.com/simple/ --trusted-host pypi.antfin-inc.com \
&& python3 -m pip install nest_asyncio pexpect requests pytest httpx cython==3.0.0a11 sphinx myst_parser sphinx_panels sphinx_rtd_theme numpy==1.19.5 torch==1.10.2 ogb pandas==0.24.2 -i https://pypi.antfin-inc.com/simple/ --trusted-host pypi.antfin-inc.com \
&& rm -rf /Python*
# dgl==1.0.0 :Could not find a version that satisfies the requirement dgl
# install cmake
# if it is not accessible, replace it with the link below
# https://cmake.org/files/v3.25/cmake-3.25.2.tar.gz
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/cmake-3.25.2.tar.gz \
&& tar xf cmake-3.25.2.tar.gz && cd cmake-3.25.2 \
&& ./bootstrap && make -j4 && make install && rm -rf /cmake-3.*
# install boost-1.68
# if it is not accessible, replace it with the link below
# https://boostorg.jfrog.io/artifactory/main/release/1.68.0/source/boost_1_68_0.tar.gz
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/boost_1_68_0.tar.gz \
&& tar xf boost_1_68_0.tar.gz && cd boost_1_68_0 \
&& ./bootstrap.sh --with-libraries=system,random,thread,filesystem,chrono,atomic,date_time,regex,stacktrace,log \
&& ./b2 -j4 cxxflags="-std=c++14 -fPIC" install && rm -rf /boost_*
# install protobuf
# if it is not accessible, replace it with the link below
# https://github.com/protocolbuffers/protobuf/archive/v3.6.0.tar.gz -O protobuf-3.6.0.tar.gz
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/protobuf-3.6.0.tar.gz \
&& tar xf protobuf-3.6.0.tar.gz && cd protobuf-3.6.0 \
&& ./autogen.sh && ./configure CFLAGS='-fPIC' CXXFLAGS='-fPIC' --prefix=/usr/local \
&& make -j4 && make install && ldconfig && rm -rf /protobuf-*
# install snappy
# if it is not accessible, replace it with the link below
# https://github.com/google/snappy/archive/refs/tags/1.1.9.zip
# https://github.com/google/googletest/archive/refs/heads/v1.10.x.zip
# https://github.com/google/benchmark/archive/bf585a2789e30585b4e3ce6baf11ef2750b54677.zip
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/snappy-1.1.9.zip \
&& unzip snappy-1.1.9.zip && mv snappy-1.1.9 snapppy && cd snapppy/third_party/ \
&& wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/googletest-v1.10.x.zip \
&& unzip googletest-v1.10.x.zip && rm -rf googletest && mv googletest-1.10.x googletest \
&& wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/benchmark.zip \
&& unzip benchmark.zip && rm -rf benchmark && mv benchmark-bf585a2789e30585b4e3ce6baf11ef2750b54677 benchmark \
&& cd .. && mkdir build && cd build \
&& cmake -DCMAKE_CXX_FLAGS=-fPIC .. && make -j4 && make install && rm -rf /snappy*
# install gflags
# if it is not accessible, replace it with the link below
# https://github.com/gflags/gflags/archive/v2.2.1.tar.gz -O gflags-2.2.1.tar.gz
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/gflags-2.2.1.tar.gz \
&& tar xf gflags-2.2.1.tar.gz && cd gflags-2.2.1 \
&& mkdir build && cd build && cmake -DCMAKE_CXX_FLAGS=-fPIC .. \
&& make -j4 && make install && rm -rf /gflags-*
# install leveldb
# if it is not accessible, replace it with the link below
# https://github.com/google/leveldb/archive/refs/tags/v1.20.zip
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/leveldb-v1.20.zip \
&& unzip leveldb-v1.20.zip && mv leveldb-1.20 leveldb \
&& cd leveldb && CFLAGS="-fPIC" CXXFLAGS="-fPIC" make -j4 \
&& cp -r ./include/leveldb/ /usr/local/include/ \
&& cp ./out-shared/libleveldb.so.1.20 /usr/local/lib/ \
&& cp ./out-static/libleveldb.a /usr/local/lib/ \
&& ln -s /usr/local/lib/libleveldb.so.1.20 /usr/local/lib/libleveldb.so.1 \
&& ln -s /usr/local/lib/libleveldb.so.1.20 /usr/local/lib/libleveldb.so \
&& rm -rf /leveldb*
# install node.js
# https://nodejs.org/dist/v16.6.0/node-v16.20.0-linux-arm64.tar.gz
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/node-v16.20.0-linux-arm64.tar.gz \
&& tar xvf node-v16.20.0-linux-arm64.tar.gz && cd node-v16.20.0-linux-arm64/ \
&& ln -s /node-v16.20.0-linux-arm64/bin/npm /usr/local/bin/ \
&& ln -s /node-v16.20.0-linux-arm64/bin/node /usr/local/bin/ \
&& npm config set registry https://registry.npmmirror.com \
&& rm -rf /node-v16.20.0-linux-arm64.tar.gz \
&& npm install --global yarn \
&& npm install --global pnpm \
&& ln -s /node-v16.20.0-linux-x64/lib/node_modules/yarn/bin/yarn /usr/local/bin/yarn \
&& ln -s /node-v16.20.0-linux-arm64/bin/pnpm /usr/local/bin/pnpm \
&& yarn config set registry https://registry.npmmirror.com \
&& pnpm config set registry https://registry.npmmirror.com
# install lcov
# if it is not accessible, replace it with the link below
# https://github.com/linux-test-project/lcov/releases/download/v1.14/lcov-1.14-1.noarch.rpm
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/lcov-1.14-1.noarch.rpm \
&& rpm -ivh lcov-1.14-1.noarch.rpm \
&& rm lcov-1.14-1.noarch.rpm
#install maven
# if it is not accessible, replace it with the link below
# https://dlcdn.apache.org/maven/maven-3/3.8.7/binaries/apache-maven-3.8.7-bin.tar.gz
RUN cd opt \
&& wget --no-check-certificate https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/apache-maven-3.8.7-bin.tar.gz \
&& tar xf apache-maven-3.8.7-bin.tar.gz \
&& rm apache-maven-*.tar.gz
ARG CMAKE_OPT="-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 -DBUILD_TESTS=0 -DBUILD_SAMPLES=0 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++"
# brpc
# if it is not accessible, replace it with the link below
# wget https://github.com/apache/incubator-brpc/archive/refs/heads/release-1.2.zip
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/brpc-release-1.2.zip \
&& unzip brpc-release-1.2.zip && mv brpc-release-1.2 brpc && cd /brpc && mkdir build && cd build \
&& cmake $CMAKE_OPT -DBUILD_UNIT_TESTS=0 .. && make -j4 && make install \
&& rm -rf /brpc*
# cpprestsdk
# if it is not accessible, replace it with the link below
# https://github.com/microsoft/cpprestsdk/archive/refs/tags/v2.10.18.zip
# https://github.com/zaphoyd/websocketpp/archive/56123c87598f8b1dd471be83ca841ceae07f95ba.zip
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/cpprestsdk-v2.10.18.zip \
&& unzip cpprestsdk-v2.10.18.zip && mv cpprestsdk-2.10.18 cpprestsdk && cd /cpprestsdk/Release/libs/ \
&& wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/websocketpp.zip \
&& unzip websocketpp.zip && rm -rf websocketpp && mv websocketpp-56123c87598f8b1dd471be83ca841ceae07f95ba websocketpp \
&& cd .. \
# - set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries")
# + set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libraries")
&& sed -i '/ set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries")/c\ set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libraries")' CMakeLists.txt \
&& mkdir build && cd build \
&& cmake $CMAKE_OPT -DCMAKE_CXX_FLAGS=-fPIC -Wno-error=unused-parameter -DBoost_USE_STATIC_LIBS=1 .. && make -j4 && make install \
&& rm -rf /cpprestsdk*
# googletest
# if it is not accessible, replace it with the link below
# https://github.com/google/googletest/archive/refs/tags/release-1.12.1.zip
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/googletest-release-1.12.1.zip \
&& unzip googletest-release-1.12.1.zip && mv googletest-release-1.12.1 googletest && cd /googletest && mkdir build && cd build \
&& cmake $CMAKE_OPT .. && make -j4 && make install \
&& rm -rf /googletest*
# jwt-cpp
# if it is not accessible, replace it with the link below
# https://github.com/Thalhammer/jwt-cpp/archive/refs/tags/v0.6.0.zip
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/jwt-v0.6.0.zip \
&& unzip jwt-v0.6.0.zip && mv jwt-cpp-0.6.0 jwt-cpp && cd /jwt-cpp && cp -r include/jwt-cpp/ /usr/local/include \
&& cp -r include/picojson/ /usr/local/include \
&& rm -rf /jwt-cpp*
# prometheus-cpp-client
# if it is not accessible, replace it with the link below
# https://github.com/jupp0r/prometheus-cpp/archive/refs/tags/v1.0.1.zip
# https://github.com/civetweb/civetweb/archive/eefb26f82b233268fc98577d265352720d477ba4.zip
# https://github.com/google/googletest/archive/e2239ee6043f73722e7aa812a459f54a28552929.zip
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/prometheus-cpp-client-v1.0.1.zip \
&& unzip prometheus-cpp-client-v1.0.1.zip && mv prometheus-cpp-1.0.1 prometheus-cpp-client && cd /prometheus-cpp-client/3rdparty/ \
&& wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/civetweb.zip \
&& unzip civetweb.zip && rm -rf civetweb \
&& mv civetweb-eefb26f82b233268fc98577d265352720d477ba4 civetweb \
&& wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/googletest.zip \
&& unzip googletest.zip && rm -rf googletest \
&& mv googletest-e2239ee6043f73722e7aa812a459f54a28552929 googletest \
&& cd .. && mkdir build && cd build \
&& cmake $CMAKE_OPT .. && make -j4 && make install \
&& rm -rf /prometheus-cpp-client*
# pybind11
# if it is not accessible, replace it with the link below
# https://github.com/pybind/pybind11/archive/refs/tags/v2.10.0.zip
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/pybind11-v2.10.0.zip \
&& unzip pybind11-v2.10.0.zip && mv pybind11-2.10.0 pybind11 && cd /pybind11 && cp -r include/pybind11 /usr/local/include \
&& rm -rf /pybind11*
# braft
# if it is not accessible, replace it with the link below
# wget https://github.com/baidu/braft/archive/refs/tags/v1.1.2.zip
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/braft-v1.1.2.zip \
&& unzip braft-v1.1.2.zip && mv braft-1.1.2/ braft && cd braft \
# - set(CMAKE_CPP_FLAGS "${CMAKE_CPP_FLAGS} -msse4 -msse4.2")
&& sed -i '/.*set(CMAKE_CPP_FLAGS "${CMAKE_CPP_FLAGS} -msse4 -msse4.2")*/c\' CMakeLists.txt \
&& mkdir build && cd build && cmake $CMAKE_OPT .. && make -j4 && make install \
&& rm -rf /braft*
# jemalloc
# if it is not accessible, replace it with the link below
# https://github.com/jemalloc/jemalloc/archive/refs/tags/5.3.0.tar.gz
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/jemalloc-5.3.0.tar.gz \
&& tar zxf jemalloc-5.3.0.tar.gz && cd jemalloc-5.3.0 && CFLAGS="-fPIC" CXXFLAGS="-fPIC" ./autogen.sh && make -j4 && make install \
&& rm -rf /jemalloc*
# rocksdb
# if it is not accessible, replace it with the link below
# https://github.com/facebook/rocksdb/archive/refs/tags/v7.8.3.tar.gz
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/rocksdb-v7.8.3.tar.gz \
# -DFORCE_SSE42=OFF
&& tar zxf rocksdb-v7.8.3.tar.gz && cd rocksdb-7.8.3 && cmake -DCMAKE_BUILD_TYPE=Release -DPORTABLE=ON -DFORCE_SSE42=OFF -DWITH_JEMALLOC=ON \
&& make -j6 && make install && rm -rf /rocksdb*
# set maven mirror
RUN mkdir -p ~/.m2 \
&& echo '<settings>' > ~/.m2/settings.xml \
&& echo ' <mirrors>' >> ~/.m2/settings.xml \
&& echo ' <mirror>' >> ~/.m2/settings.xml \
&& echo ' <id>alimaven</id>' >> ~/.m2/settings.xml \
&& echo ' <mirrorOf>central</mirrorOf>' >> ~/.m2/settings.xml \
&& echo ' <url>https://maven.aliyun.com/nexus/content/groups/public/</url>' >> ~/.m2/settings.xml \
&& echo ' </mirror>' >> ~/.m2/settings.xml \
&& echo ' </mirrors>' >> ~/.m2/settings.xml \
&& echo '</settings>' >> ~/.m2/settings.xml \
&& cat ~/.m2/settings.xml
# install antlr4-4.13.0
# if it is not accessible, replace it with the link below
# https://github.com/antlr/antlr4/archive/refs/tags/4.13.0.tar.gz
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/antlr4-4.13.0.tar.gz \
&& tar zxf antlr4-4.13.0.tar.gz && cd antlr4-4.13.0/runtime/Cpp/ \
&& mkdir -p build && cd build \
&& cmake -DWITH_DEMO=0 -DANTLR_BUILD_CPP_TESTS=0 -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_FLAGS=-fPIC -DANTLR4_INSTALL=1 -DCMAKE_INSTALL_PREFIX=/usr/local .. \
&& make ${JFLAG} && make install \
&& cd ../../../ && JAVA_HOME=/usr/lib/jvm/java-11-openjdk PATH=/opt/apache-maven-3.8.7/bin:$PATH mvn package -DskipTests \
&& cp tool/target/antlr4-4.13.0-complete.jar /usr/local/bin \
&& chmod 755 /usr/local/bin/antlr4-4.13.0-complete.jar \
&& rm -rf /antlr4-4.13.0*
# install openssl 1.0.2u
# if it is not accessible, replace it with the link below
# https://www.openssl.org/source/old/1.0.2/openssl-1.0.2u.tar.gz
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/openssl-1.0.2u.tar.gz \
&& tar zxf openssl-1.0.2u.tar.gz && cd openssl-1.0.2u \
&& ./config -fPIC --prefix=/usr \
&& make ${JFLAG} && make install \
&& cp libssl.a /usr/lib64/ && cp libcrypto.a /usr/lib64/ \
&& rm -rf /openssl-1.0.2u*
# install glog-0.3.5
# if it is not accessible, replace it with the link below
# https://github.com/google/glog/archive/refs/tags/v0.3.5.tar.gz
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/glog-0.3.5.tar.gz \
&& tar zxf glog-0.3.5.tar.gz && cd glog-0.3.5 \
&& mkdir -p build && cd build \
&& cmake -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_INSTALL_PREFIX=/usr/local .. \
&& make ${JFLAG} && make install \
&& rm -rf /glog-0.3.5*
# Using 3rd-party package stored in oss to accelerate Apache arrow building
ENV ARROW_ABSL_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/absl-20211102.0.tar.gz \
ARROW_AWSSDK_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/aws-sdk-cpp-1.8.133.tar.gz \
ARROW_AWS_CHECKSUMS_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/aws-checksums-v0.1.12.tar.gz \
ARROW_AWS_C_COMMON_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/aws-c-common-v0.6.9.tar.gz \
ARROW_AWS_C_EVENT_STREAM_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/aws-c-event-stream-v0.1.5.tar.gz \
ARROW_BOOST_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/boost-1.75.0.tar.gz \
ARROW_BROTLI_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/brotli-v1.0.9.tar.gz \
ARROW_BZIP2_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/bzip2-1.0.8.tar.gz \
ARROW_CARES_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/cares-1.17.2.tar.gz \
ARROW_CRC32C_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/crc32c-1.1.2.tar.gz \
ARROW_GBENCHMARK_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/gbenchmark-v1.6.0.tar.gz \
ARROW_GFLAGS_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/gflags-v2.2.2.tar.gz \
ARROW_GLOG_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/glog-v0.5.0.tar.gz \
ARROW_GOOGLE_CLOUD_CPP_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/google-cloud-cpp-v1.42.0.tar.gz \
ARROW_GRPC_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/grpc-v1.46.3.tar.gz \
ARROW_GTEST_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/gtest-1.11.0.tar.gz \
ARROW_JEMALLOC_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/jemalloc-5.3.0.tar.bz2 \
ARROW_LZ4_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/lz4-v1.9.4.tar.gz \
ARROW_MIMALLOC_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/mimalloc-v2.0.6.tar.gz \
ARROW_NLOHMANN_JSON_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/nlohmann-json-v3.10.5.tar.gz \
ARROW_OPENTELEMETRY_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/opentelemetry-cpp-v1.4.1.tar.gz \
ARROW_OPENTELEMETRY_PROTO_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/opentelemetry-proto-v0.17.0.tar.gz \
ARROW_ORC_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/orc-1.9.0.tar.gz \
ARROW_PROTOBUF_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/protobuf-v21.3.tar.gz \
ARROW_RAPIDJSON_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/rapidjson-232389d4f1012dddec4ef84861face2d2ba85709.tar.gz \
ARROW_RE2_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/re2-2022-06-01.tar.gz \
ARROW_SNAPPY_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/snappy-1.1.9.tar.gz \
ARROW_THRIFT_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/thrift-0.16.0.tar.gz \
ARROW_UCX_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/ucx-1.12.1.tar.gz \
ARROW_UTF8PROC_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/utf8proc-v2.7.0.tar.gz \
ARROW_XSIMD_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/xsimd-9.0.1.tar.gz \
ARROW_ZLIB_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/zlib-1.2.13.tar.gz \
ARROW_ZSTD_URL=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/arrow-deps/zstd-1.5.5.tar.gz
# install Apache arrow
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/apache-arrow-13.0.0.tar.gz \
&& tar xf apache-arrow-13.0.0.tar.gz && cd apache-arrow-13.0.0/cpp && mkdir build && cd build \
&& cmake .. -DARROW_DATASET=ON -DARROW_PARQUET=ON -DARROW_ORC=ON -DARROW_CSV=ON && make ${JFLAG} \
&& make install && rm -rf /apache-arrow-*
# install GraphAr
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/graphar/GraphAr-0.11.1.tar.gz \
&& tar xf GraphAr-0.11.1.tar.gz && cd GraphAr-0.11.1/cpp && mkdir build && cd build \
&& cmake .. && make ${JFLAG} && make install && rm -rf /GraphAr-*
# tabulate
# if it is not accessible, replace it with the link below
# https://github.com/p-ranav/tabulate/archive/refs/tags/v1.5.tar.gz
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/tabulate-1.5.tar.gz \
&& tar zxf tabulate-1.5.tar.gz && cp -rf tabulate-1.5/include/tabulate /usr/local/include \
&& rm -rf /tabulate*
RUN sed -i '3 s/-lgomp/-l:libgomp.a/' /usr/local/lib64/libgomp.spec
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk \
LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib:/usr/lib/jvm/java-11-openjdk/lib/server:$LD_LIBRARY_PATH \
PYTHONPATH=/usr/local/lib64:$PYTHONPATH \
PATH=/opt/apache-maven-3.8.7/bin:$PATH
# set locale
RUN localedef -c -f UTF-8 -i zh_CN zh_CN.utf8
ENV LANG zh_CN.utf8
ENV LC_ALL zh_CN.utf8