blob: 954cf760e21e70504fc3b857d3e0378b4b2c83f2 [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
Stella Laurenzo27c448e2021-09-24 17:53:21 -070011FROM gcr.io/iree-oss/cmake-python@sha256:7e31103ee35f52e6d6019adf474bc60758710e95f20ee33ed94aee3f8780edbd 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
Phoenix Meadowlark046bfaf2020-12-10 15:45:28 -080015COPY --from=gcr.io/iree-oss/vulkan@sha256:5812ee64806a7f3df0739ccf0930c27cabce346901488eceb1ee66c9c0a5ae96 \
16 /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/