Dockerfile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435
  1. # Copyright 2020 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. # The aarch64 wheels are being crosscompiled to allow running the build
  15. # on x64 machine. The dockcross/manylinux2014-aarch64 image is a x86_64
  16. # image with crosscompilation toolchain installed.
  17. # Use an older version of dockcross image that has gcc4.9.4 because it was built
  18. # before https://github.com/dockcross/dockcross/pull/449
  19. FROM dockcross/manylinux2014-aarch64:20200929-608e6ac
  20. ###################################
  21. # Install Python build requirements
  22. RUN /opt/python/cp35-cp35m/bin/pip install --upgrade cython
  23. RUN /opt/python/cp36-cp36m/bin/pip install --upgrade cython
  24. RUN /opt/python/cp37-cp37m/bin/pip install --upgrade cython
  25. RUN /opt/python/cp38-cp38/bin/pip install --upgrade cython
  26. RUN /opt/python/cp39-cp39/bin/pip install --upgrade cython
  27. # the dockcross docker image sets variables like CC, CXX etc.
  28. # to point to the crosscompilation toolchain, but doesn't set corresponding
  29. # variables for the "strip" and "objcopy" tools.
  30. # see https://github.com/dockcross/dockcross/blob/4349cb4999401cbf22a90f46f5052d29be240e50/manylinux2014-aarch64/Dockerfile.in#L23
  31. ENV STRIP=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-strip \
  32. OBJCOPY=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-objcopy