2017-06-30 17:46:45 +08:00
|
|
|
#===- llvm/utils/docker/nvidia-cuda/build/Dockerfile ---------------------===//
|
|
|
|
#
|
|
|
|
# The LLVM Compiler Infrastructure
|
|
|
|
#
|
|
|
|
# This file is distributed under the University of Illinois Open Source
|
|
|
|
# License. See LICENSE.TXT for details.
|
|
|
|
#
|
|
|
|
#===----------------------------------------------------------------------===//
|
2018-03-26 23:12:30 +08:00
|
|
|
# Stage 1. Check out LLVM source code and run the build.
|
|
|
|
FROM nvidia/cuda:8.0-devel as builder
|
2017-06-30 17:46:45 +08:00
|
|
|
LABEL maintainer "LLVM Developers"
|
|
|
|
# Install llvm build dependencies.
|
|
|
|
RUN apt-get update && \
|
2017-09-15 21:35:54 +08:00
|
|
|
apt-get install -y --no-install-recommends ca-certificates cmake python \
|
2018-03-26 23:12:30 +08:00
|
|
|
subversion ninja-build && \
|
2017-06-30 17:46:45 +08:00
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2017-09-15 21:35:54 +08:00
|
|
|
ADD checksums /tmp/checksums
|
|
|
|
ADD scripts /tmp/scripts
|
2018-04-20 18:19:38 +08:00
|
|
|
|
|
|
|
# Checkout the source code.
|
|
|
|
ARG checkout_args
|
|
|
|
RUN /tmp/scripts/checkout.sh ${checkout_args}
|
2018-03-26 23:12:30 +08:00
|
|
|
# Run the build. Results of the build will be available at /tmp/clang-install/.
|
2018-04-20 18:19:38 +08:00
|
|
|
ARG buildscript_args
|
|
|
|
RUN /tmp/scripts/build_install_llvm.sh --to /tmp/clang-install ${buildscript_args}
|
2018-03-26 23:12:30 +08:00
|
|
|
|
|
|
|
|
|
|
|
# Stage 2. Produce a minimal release image with build results.
|
|
|
|
FROM nvidia/cuda:8.0-devel
|
|
|
|
LABEL maintainer "LLVM Developers"
|
|
|
|
# Copy clang installation into this container.
|
|
|
|
COPY --from=builder /tmp/clang-install/ /usr/local/
|
|
|
|
# C++ standard library and binutils are already included in the base package.
|