Added extra swiftshader image to simplify and speed up builds of main image
This commit is contained in:
parent
f7c583d718
commit
88dca27736
3 changed files with 64 additions and 11 deletions
|
|
@ -1,30 +1,30 @@
|
|||
FROM ubuntu:18.04
|
||||
|
||||
# Base packages from default ppa
|
||||
RUN apt-get update -y
|
||||
RUN apt-get install -y wget
|
||||
RUN apt-get install -y gnupg
|
||||
RUN apt-get install -y ca-certificates
|
||||
RUN apt-get install -y software-properties-common
|
||||
|
||||
# Repository to install latest cmake
|
||||
# Repository to latest cmake
|
||||
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | apt-key add -
|
||||
RUN apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
|
||||
# Refresh repositories
|
||||
RUN apt-get update -y
|
||||
|
||||
# Repository for latest git (needed for gh actions)
|
||||
RUN add-apt-repository -y ppa:git-core/ppa
|
||||
|
||||
# Refresh repositories
|
||||
RUN apt update -y
|
||||
|
||||
RUN apt install -y git
|
||||
RUN apt-get install -y cmake g++
|
||||
RUN apt-get install -y libvulkan-dev
|
||||
RUN apt-get install -y git
|
||||
RUN apt-get install -y g++-8 gcc-8
|
||||
# Swiftshader dependencies
|
||||
RUN apt-get install -y libx11-dev zlib1g-dev
|
||||
RUN apt-get install -y libxext-dev
|
||||
|
||||
# Run swiftshader via env VK_ICD_FILENAMES=/swiftshader/vk_swiftshader_icd.json
|
||||
RUN git clone https://github.com/google/swiftshader swiftshader-build
|
||||
RUN CC="/usr/bin/gcc-8" CXX="/usr/bin/g++-8" cmake swiftshader-build/. -Bswiftshader-build/build/
|
||||
RUN cmake --build swiftshader-build/build/. --parallel 12
|
||||
RUN mv swiftshader-build/build/Linux/ swiftshader/
|
||||
RUN rm -rf swiftshader-build/
|
||||
COPY --from=axsauze/swiftshader:0.1 /swiftshader/ /swiftshader/
|
||||
|
||||
# Setup Python
|
||||
RUN apt-get install -y python3-pip
|
||||
|
|
|
|||
19
docker-builders/Makefile
Normal file
19
docker-builders/Makefile
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
build_kompute_builder:
|
||||
docker build .. -f KomputeBuilder.Dockerfile -t axsauze/kompute-builder:0.2
|
||||
|
||||
push_kompute_builder:
|
||||
docker push axsauze/kompute-builder:0.2
|
||||
|
||||
build_swiftshader:
|
||||
docker build .. -f Swiftshader.Dockerfile -t axsauze/swiftshader:0.1
|
||||
|
||||
push_swiftshader:
|
||||
docker push axsauze/swiftshader:0.1
|
||||
|
||||
build_vulkan_sdk:
|
||||
docker build .. -f VulkanSDK.Dockerfile -t axsauze/vulkan-sdk:0.1
|
||||
|
||||
push_vulkan_sdk:
|
||||
docker push axsauze/vulkan-sdk:0.1
|
||||
|
||||
34
docker-builders/Swiftshader.Dockerfile
Normal file
34
docker-builders/Swiftshader.Dockerfile
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
FROM ubuntu:18.04
|
||||
|
||||
# Base packages from default ppa
|
||||
RUN apt-get update -y
|
||||
RUN apt-get install -y wget
|
||||
RUN apt-get install -y gnupg
|
||||
RUN apt-get install -y ca-certificates
|
||||
RUN apt-get install -y software-properties-common
|
||||
|
||||
# Repository to latest cmake
|
||||
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | apt-key add -
|
||||
RUN apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
|
||||
|
||||
# Repository for latest git (needed for gh actions)
|
||||
RUN add-apt-repository -y ppa:git-core/ppa
|
||||
|
||||
# Refresh repositories
|
||||
RUN apt update -y
|
||||
|
||||
RUN apt install -y git
|
||||
RUN apt-get install -y cmake g++
|
||||
RUN apt-get install -y libvulkan-dev
|
||||
|
||||
# Dependencies for swiftshader
|
||||
RUN apt-get install -y g++-8 gcc-8
|
||||
RUN apt-get install -y libx11-dev zlib1g-dev
|
||||
RUN apt-get install -y libxext-dev
|
||||
|
||||
# Run swiftshader via env VK_ICD_FILENAMES=/swiftshader/vk_swiftshader_icd.json
|
||||
RUN git clone https://github.com/google/swiftshader swiftshader-build
|
||||
RUN CC="/usr/bin/gcc-8" CXX="/usr/bin/g++-8" cmake swiftshader-build/. -Bswiftshader-build/build/
|
||||
RUN cmake --build swiftshader-build/build/. --parallel 12
|
||||
COPY swiftshader-build/build/Linux/ swiftshader/
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue