• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#===- llvm/utils/docker/nvidia-cuda/build/Dockerfile ---------------------===//
2#
3# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4# See https://llvm.org/LICENSE.txt for license information.
5# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6#
7#===----------------------------------------------------------------------===//
8# Stage 1. Check out LLVM source code and run the build.
9FROM nvidia/cuda:8.0-devel as builder
10LABEL maintainer "LLVM Developers"
11# Install llvm build dependencies.
12RUN apt-get update && \
13    apt-get install -y --no-install-recommends ca-certificates cmake python \
14        subversion ninja-build && \
15    rm -rf /var/lib/apt/lists/*
16
17ADD checksums /tmp/checksums
18ADD scripts /tmp/scripts
19
20# Checkout the source code.
21ARG checkout_args
22RUN /tmp/scripts/checkout.sh ${checkout_args}
23# Run the build. Results of the build will be available at /tmp/clang-install/.
24ARG buildscript_args
25RUN /tmp/scripts/build_install_llvm.sh --to /tmp/clang-install ${buildscript_args}
26
27
28# Stage 2. Produce a minimal release image with build results.
29FROM nvidia/cuda:8.0-devel
30LABEL maintainer "LLVM Developers"
31# Copy clang installation into this container.
32COPY --from=builder /tmp/clang-install/ /usr/local/
33# C++ standard library and binutils are already included in the base package.
34