blob: 0c738fbdf54e825bf2107f21b6300fc89bdd76a8 [file] [log] [blame]
Geoffrey Martin-Noble552d3f82021-05-25 17:56:09 -07001# Copyright 2020 The IREE Authors
Lei Zhanga33973e2020-07-24 14:15:58 -04002#
Geoffrey Martin-Noble552d3f82021-05-25 17:56:09 -07003# 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 Zhanga33973e2020-07-24 14:15:58 -04006
Lei Zhangc6090572020-11-16 12:51:10 -05007# 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 Zhanga33973e2020-07-24 14:15:58 -040010
Geoffrey Martin-Noblead8f7332021-10-21 09:18:54 -070011FROM gcr.io/iree-oss/cmake@sha256:37ddc553262f28a4c290eb3ccda5e50ef1115209fbb62a44a85165e7b6f7d514 AS final
Lei Zhanga33973e2020-07-24 14:15:58 -040012
Lei Zhangc6090572020-11-16 12:51:10 -050013ARG VULKAN_SDK_VERSION=1.2.154.0
Lei Zhanga33973e2020-07-24 14:15:58 -040014
Geoffrey Martin-Noblead8f7332021-10-21 09:18:54 -070015COPY --from=gcr.io/iree-oss/vulkan@sha256:e1c1c5ddbe6b130ff0577572b97094e7a64a3aa003fdd4a91d1b21be705ddf8a \
Phoenix Meadowlark046bfaf2020-12-10 15:45:28 -080016 /opt/vulkan-sdk/ /opt/vulkan-sdk/
Lei Zhanga33973e2020-07-24 14:15:58 -040017
Lei Zhangc6090572020-11-16 12:51:10 -050018ENV VULKAN_SDK="/opt/vulkan-sdk/${VULKAN_SDK_VERSION}/x86_64"
Geoffrey Martin-Noblef941efb2020-09-15 13:16:05 -070019
Lei Zhangc6090572020-11-16 12:51:10 -050020ENV 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.
25RUN 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/