• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2024 The gRPC Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64/Dockerfile.template`!!!
16
17FROM dockcross/manylinux2014-aarch64
18
19# manylinux_2_17 is the preferred alias of manylinux2014
20ENV AUDITWHEEL_PLAT manylinux_2_17_$AUDITWHEEL_ARCH
21
22#===================================
23# Install Python build requirements
24RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<4.0.0rc1'
25RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<4.0.0rc1'
26RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<4.0.0rc1'
27RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<4.0.0rc1'
28RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<4.0.0rc1'
29RUN /opt/python/cp313-cp313/bin/pip install --upgrade 'cython<4.0.0rc1'
30
31#=================
32# Install ccache
33
34# Install ccache from source since ccache 3.x packaged with most linux distributions
35# does not support Redis backend for caching.
36RUN unset CMAKE_TOOLCHAIN_FILE && unset AS AR CC CPP CXX LD STRIP OBJCOPY \
37    && curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.7.5/ccache-4.7.5.tar.gz \
38    && tar -zxf ccache.tar.gz \
39    && cd ccache-4.7.5 \
40    && mkdir build && cd build \
41    && cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. \
42    && make -j4 && make install \
43    && cd ../.. \
44    && rm -rf ccache-4.7.5 ccache.tar.gz
45
46
47# TODO: simplify the list of third_party modules list
48# NOTE: git>=2.46 allows leading paths like third_party/* to include all subdirectories
49# current docker base images use git versions lower than 2.46 and hence require separate configs for each submodule
50RUN git config --global --add safe.directory /var/local/jenkins/grpc
51RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git
52RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/bloaty
53RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/xds
54RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googleapis
55RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googletest
56RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry
57RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opencensus-proto
58RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/boringssl-with-bazel
59RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/envoy-api
60RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protobuf
61RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/zlib
62RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/benchmark
63RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/re2
64RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/abseil-cpp
65RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry-cpp
66RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protoc-gen-validate
67RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/cares/cares
68RUN git config --global protocol.file.allow always
69