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 | |
Stella Laurenzo | 27c448e | 2021-09-24 17:53:21 -0700 | [diff] [blame^] | 11 | FROM gcr.io/iree-oss/cmake-python@sha256:7e31103ee35f52e6d6019adf474bc60758710e95f20ee33ed94aee3f8780edbd 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 | |
Phoenix Meadowlark | 046bfaf | 2020-12-10 15:45:28 -0800 | [diff] [blame] | 15 | COPY --from=gcr.io/iree-oss/vulkan@sha256:5812ee64806a7f3df0739ccf0930c27cabce346901488eceb1ee66c9c0a5ae96 \ |
| 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/ |