1d9502010SIlya Biryukov#===- llvm/utils/docker/nvidia-cuda/build/Dockerfile ---------------------===// 2d9502010SIlya Biryukov# 32946cd70SChandler Carruth# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 42946cd70SChandler Carruth# See https://llvm.org/LICENSE.txt for license information. 52946cd70SChandler Carruth# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6d9502010SIlya Biryukov# 7d9502010SIlya Biryukov#===----------------------------------------------------------------------===// 8d9502010SIlya Biryukov# Stage 1. Check out LLVM source code and run the build. 9d9502010SIlya BiryukovFROM nvidia/cuda:8.0-devel as builder 10d9502010SIlya BiryukovLABEL maintainer "LLVM Developers" 11d9502010SIlya Biryukov# Install llvm build dependencies. 12d9502010SIlya BiryukovRUN apt-get update && \ 13d9502010SIlya Biryukov apt-get install -y --no-install-recommends ca-certificates cmake python \ 14*2d9b7fdaSXiaodong Liu subversion ninja-build git && \ 15d9502010SIlya Biryukov rm -rf /var/lib/apt/lists/* 16d9502010SIlya Biryukov 17d9502010SIlya BiryukovADD checksums /tmp/checksums 18d9502010SIlya BiryukovADD scripts /tmp/scripts 192bf7c51dSIlya Biryukov 202bf7c51dSIlya Biryukov# Checkout the source code. 212bf7c51dSIlya BiryukovARG checkout_args 222bf7c51dSIlya BiryukovRUN /tmp/scripts/checkout.sh ${checkout_args} 23d9502010SIlya Biryukov# Run the build. Results of the build will be available at /tmp/clang-install/. 242bf7c51dSIlya BiryukovARG buildscript_args 252bf7c51dSIlya BiryukovRUN /tmp/scripts/build_install_llvm.sh --to /tmp/clang-install ${buildscript_args} 26d9502010SIlya Biryukov 27d9502010SIlya Biryukov 28d9502010SIlya Biryukov# Stage 2. Produce a minimal release image with build results. 29d9502010SIlya BiryukovFROM nvidia/cuda:8.0-devel 30d9502010SIlya BiryukovLABEL maintainer "LLVM Developers" 31d9502010SIlya Biryukov# Copy clang installation into this container. 32d9502010SIlya BiryukovCOPY --from=builder /tmp/clang-install/ /usr/local/ 33d9502010SIlya Biryukov# C++ standard library and binutils are already included in the base package. 34