Geoffrey Martin-Noble | 552d3f8 | 2021-05-25 17:56:09 -0700 | [diff] [blame] | 1 | # Copyright 2020 The IREE Authors |
Lei Zhang | a33973e | 2020-07-24 14:15:58 -0400 | [diff] [blame] | 2 | # |
Geoffrey Martin-Noble | 552d3f8 | 2021-05-25 17:56:09 -0700 | [diff] [blame] | 3 | # Licensed 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 |
Lei Zhang | a33973e | 2020-07-24 14:15:58 -0400 | [diff] [blame] | 6 | |
Lei Zhang | c609057 | 2020-11-16 12:51:10 -0500 | [diff] [blame] | 7 | # A base image for building IREE using CMake and running Vulkan tests. |
| 8 | # This image provides the Vulkan SDK. Requires a child image to provide |
| 9 | # a Vulkan ICD. |
Lei Zhang | a33973e | 2020-07-24 14:15:58 -0400 | [diff] [blame] | 10 | |
Geoffrey Martin-Noble | ad8f733 | 2021-10-21 09:18:54 -0700 | [diff] [blame] | 11 | FROM gcr.io/iree-oss/cmake@sha256:37ddc553262f28a4c290eb3ccda5e50ef1115209fbb62a44a85165e7b6f7d514 AS final |
Lei Zhang | a33973e | 2020-07-24 14:15:58 -0400 | [diff] [blame] | 12 | |
Lei Zhang | c609057 | 2020-11-16 12:51:10 -0500 | [diff] [blame] | 13 | ARG VULKAN_SDK_VERSION=1.2.154.0 |
Lei Zhang | a33973e | 2020-07-24 14:15:58 -0400 | [diff] [blame] | 14 | |
Geoffrey Martin-Noble | ad8f733 | 2021-10-21 09:18:54 -0700 | [diff] [blame] | 15 | COPY --from=gcr.io/iree-oss/vulkan@sha256:e1c1c5ddbe6b130ff0577572b97094e7a64a3aa003fdd4a91d1b21be705ddf8a \ |
Phoenix Meadowlark | 046bfaf | 2020-12-10 15:45:28 -0800 | [diff] [blame] | 16 | /opt/vulkan-sdk/ /opt/vulkan-sdk/ |
Lei Zhang | a33973e | 2020-07-24 14:15:58 -0400 | [diff] [blame] | 17 | |
Lei Zhang | c609057 | 2020-11-16 12:51:10 -0500 | [diff] [blame] | 18 | ENV VULKAN_SDK="/opt/vulkan-sdk/${VULKAN_SDK_VERSION}/x86_64" |
Geoffrey Martin-Noble | f941efb | 2020-09-15 13:16:05 -0700 | [diff] [blame] | 19 | |
Lei Zhang | c609057 | 2020-11-16 12:51:10 -0500 | [diff] [blame] | 20 | ENV PATH="${VULKAN_SDK}/bin:$PATH" |
| 21 | |
| 22 | # Symlink the Vulkan loader to a system library directory. This is needed to |
| 23 | # allow Vulkan applications to find the Vulkan loader. It also avoids using |
| 24 | # LD_LIBRARY_PATH, which is not supported well by Docker. |
| 25 | RUN ln -s "${VULKAN_SDK}/lib/libvulkan.so" /usr/lib/x86_64-linux-gnu/ \ |
| 26 | && ln -s "${VULKAN_SDK}/lib/libvulkan.so.1" /usr/lib/x86_64-linux-gnu/ |