| # Copyright 2020 Google LLC |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # https://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| # A base image for building IREE using CMake and running Vulkan tests. |
| # This image provides the Vulkan SDK. Requires a child image to provide |
| # a Vulkan ICD. |
| |
| FROM gcr.io/iree-oss/cmake-python@sha256:c1f05139fa478107bdd5889d6b3ca9f8a4bcf19e77e3e8058e2084367a1aa23d AS final |
| |
| ARG VULKAN_SDK_VERSION=1.2.154.0 |
| |
| COPY --from=gcr.io/iree-oss/vulkan@sha256:5812ee64806a7f3df0739ccf0930c27cabce346901488eceb1ee66c9c0a5ae96 \ |
| /opt/vulkan-sdk/ /opt/vulkan-sdk/ |
| |
| ENV VULKAN_SDK="/opt/vulkan-sdk/${VULKAN_SDK_VERSION}/x86_64" |
| |
| ENV PATH="${VULKAN_SDK}/bin:$PATH" |
| |
| # Symlink the Vulkan loader to a system library directory. This is needed to |
| # allow Vulkan applications to find the Vulkan loader. It also avoids using |
| # LD_LIBRARY_PATH, which is not supported well by Docker. |
| RUN ln -s "${VULKAN_SDK}/lib/libvulkan.so" /usr/lib/x86_64-linux-gnu/ \ |
| && ln -s "${VULKAN_SDK}/lib/libvulkan.so.1" /usr/lib/x86_64-linux-gnu/ |