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.
10FROM nvidia/cuda:8.0-devel as builder
11LABEL maintainer "LLVM Developers"
12# Install llvm build dependencies.
13RUN 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
18ADD checksums /tmp/checksums
19ADD scripts /tmp/scripts
20
21# Checkout the source code.
22ARG checkout_args
23RUN /tmp/scripts/checkout.sh ${checkout_args}
24# Run the build. Results of the build will be available at /tmp/clang-install/.
25ARG buildscript_args
26RUN /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.
30FROM nvidia/cuda:8.0-devel
31LABEL maintainer "LLVM Developers"
32# Copy clang installation into this container.
33COPY --from=builder /tmp/clang-install/ /usr/local/
34# C++ standard library and binutils are already included in the base package.
35