1 #===- llvm/utils/docker/nvidia-cuda/build/Dockerfile ---------------------===// 2 # 3 # The LLVM Compiler Infrastructure 4 # 5 # This file is distributed under the University of Illinois Open Source 6 # License. See LICENSE.TXT for details. 7 # 8 #===----------------------------------------------------------------------===// 9 # Stage 1. Check out LLVM source code and run the build. 10 FROM nvidia/cuda:8.0-devel as builder 11 LABEL maintainer "LLVM Developers" 12 # Install llvm build dependencies. 13 RUN apt-get update && \ 14 apt-get install -y --no-install-recommends ca-certificates cmake python \ 15 subversion ninja-build && \ 16 rm -rf /var/lib/apt/lists/* 17 18 ADD checksums /tmp/checksums 19 ADD scripts /tmp/scripts 20 21 # Checkout the source code. 22 ARG checkout_args 23 RUN /tmp/scripts/checkout.sh ${checkout_args} 24 # Run the build. Results of the build will be available at /tmp/clang-install/. 25 ARG buildscript_args 26 RUN /tmp/scripts/build_install_llvm.sh --to /tmp/clang-install ${buildscript_args} 27 28 29 # Stage 2. Produce a minimal release image with build results. 30 FROM nvidia/cuda:8.0-devel 31 LABEL maintainer "LLVM Developers" 32 # Copy clang installation into this container. 33 COPY --from=builder /tmp/clang-install/ /usr/local/ 34 # C++ standard library and binutils are already included in the base package. 35