Skip to content

Commit 216c4e2

Browse files
authored
Merge pull request #29 from rpavlik/simplify-openxr
Simplify OpenXR
2 parents 8517e6c + 030529d commit 216c4e2

5 files changed

Lines changed: 94 additions & 113 deletions

File tree

build-all.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2019-2021 The Khronos Group Inc.
2+
# Copyright 2019-2023 The Khronos Group Inc.
33
# SPDX-License-Identifier: Apache-2.0
44

55
set -e
@@ -10,8 +10,7 @@ set -e
1010
./build-one.sh vulkan-docs-base 202206 "$@"
1111
./build-one.sh vulkan-docs 202206 "$@"
1212
./build-one.sh rust 202206 "$@"
13-
./build-one.sh openxr-base 202110 "$@"
14-
./build-one.sh openxr 202110 "$@"
15-
./build-one.sh openxr-sdk 202110 "$@"
13+
./build-one.sh openxr 20230614 "$@"
14+
./build-one.sh openxr-sdk 20230614 "$@"
1615
./build-one.sh openxr-pregenerated-sdk 202201 "$@"
1716
)

openxr-base.Dockerfile

Lines changed: 0 additions & 96 deletions
This file was deleted.

openxr-pregenerated-sdk.Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2019-2021, The Khronos Group Inc.
1+
# Copyright (c) 2019-2023, The Khronos Group Inc.
22
#
33
# SPDX-License-Identifier: Apache-2.0
44
#
@@ -17,7 +17,7 @@
1717
# This is a Docker container for OpenXR SDK CI builds.
1818
# Intended for CI use.
1919

20-
FROM ubuntu:18.04
20+
FROM ubuntu:20.04
2121
LABEL maintainer="Ryan Pavlik <ryan.pavlik@collabora.com>"
2222

2323
ENV LANG C.UTF-8
@@ -26,6 +26,7 @@ ENV LANG C.UTF-8
2626
RUN dpkg --add-architecture i386
2727

2828
# Runtime-required packages
29+
# No Python on purpose: this is to make sure we can do the build without python if we have a pregenerated tree (a la OpenXR-SDK)
2930
RUN env DEBIAN_FRONTEND=noninteractive apt-get update -qq && \
3031
env DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y -qq \
3132
build-essential \

openxr-sdk.Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2019-2021 The Khronos Group Inc.
1+
# Copyright (c) 2019-2023 The Khronos Group Inc.
22
#
33
# SPDX-License-Identifier: Apache-2.0
44
#
@@ -17,7 +17,7 @@
1717
# This is a Docker container for OpenXR SDK CI builds.
1818
# Intended for CI or interactive use.
1919

20-
FROM ubuntu:18.04
20+
FROM ubuntu:20.04
2121
LABEL maintainer="Ryan Pavlik <ryan.pavlik@collabora.com>"
2222

2323
ENV LANG C.UTF-8
@@ -26,15 +26,16 @@ ENV LANG C.UTF-8
2626
RUN dpkg --add-architecture i386
2727

2828
# Runtime-required packages
29-
RUN apt-get update -qq && \
30-
apt-get install --no-install-recommends -y -qq \
29+
RUN env DEBIAN_FRONTEND=noninteractive apt-get update -qq && \
30+
env DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y -qq \
3131
apt-transport-https \
3232
build-essential \
3333
ca-certificates \
3434
clang-10 \
3535
clang-format-10 \
3636
cmake \
3737
git \
38+
git-lfs \
3839
gnupg \
3940
libegl1-mesa-dev \
4041
libgl1-mesa-dev \

openxr.Dockerfile

Lines changed: 83 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2019-2021, The Khronos Group Inc.
1+
# Copyright (c) 2019-2023, The Khronos Group Inc.
22
#
33
# SPDX-License-Identifier: Apache-2.0
44
#
@@ -14,15 +14,91 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
# This is a Docker container for (interactive) OpenXR specification builds
17+
# This is a Docker container for OpenXR specification builds
1818

19-
ARG VERSION
20-
21-
FROM khronosgroup/docker-images:openxr-base.$VERSION
19+
FROM ruby:2.7-bullseye as builder
2220
LABEL maintainer="Ryan Pavlik <ryan.pavlik@collabora.com>"
2321

24-
# Add the entrypoint to the image
22+
# Basic spec build and check packages
23+
RUN env DEBIAN_FRONTEND=noninteractive apt-get update -qq && \
24+
env DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y -qq \
25+
bison \
26+
build-essential \
27+
cmake \
28+
flex \
29+
fonts-lyx \
30+
ghostscript \
31+
git \
32+
imagemagick \
33+
libpango1.0-dev \
34+
libreadline-dev \
35+
pdftk \
36+
poppler-utils \
37+
python3 \
38+
python3-dev \
39+
python3-attr \
40+
python3-chardet \
41+
python3-lxml \
42+
python3-networkx \
43+
python3-pillow \
44+
python3-pip \
45+
python3-requests \
46+
python3-setuptools \
47+
python3-wheel \
48+
wget && \
49+
apt-get clean && \
50+
rm -rf /var/lib/apt/lists/*
51+
# Basic gems
52+
RUN gem install rake asciidoctor coderay json-schema rghost
53+
# Newer versions break our index customizer, haven't figured out the fix yet.
54+
RUN gem install asciidoctor-pdf --version 1.6.2
55+
RUN MATHEMATICAL_SKIP_STRDUP=1 gem install asciidoctor-mathematical
56+
57+
# Basic pip packages
58+
RUN python3 -m pip install --no-cache-dir codespell pypdf2 pdoc3 reuse jinja2-cli
59+
60+
# pdf-diff pip package
61+
RUN python3 -m pip install --no-cache-dir git+https://github.com/rpavlik/pdf-diff
62+
63+
# Second stage: start a simpler image that doesn't have the dev packages
64+
FROM ruby:2.7-bullseye
65+
66+
# Copy locally-installed gems and python packages
67+
COPY --from=builder /usr/local/ /usr/local/
68+
69+
# Runtime-required packages
70+
RUN env DEBIAN_FRONTEND=noninteractive apt-get update -qq && \
71+
env DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y -qq \
72+
clang-format \
73+
fonts-lyx \
74+
ghostscript \
75+
git \
76+
git-lfs \
77+
gosu \
78+
imagemagick \
79+
jing \
80+
libpango1.0-0 \
81+
libxml2-utils \
82+
pdftk \
83+
poppler-utils \
84+
python3 \
85+
python3-attr \
86+
python3-chardet \
87+
python3-lxml \
88+
python3-networkx \
89+
python3-pillow \
90+
python3-pytest \
91+
python3-requests \
92+
python3-utidylib \
93+
python3-venv \
94+
trang \
95+
wget \
96+
xmlstarlet && \
97+
apt-get clean
98+
99+
# Add the optional entrypoint to the image
25100
COPY entrypoint.openxr.sh /root/entrypoint.openxr.sh
26101
RUN chmod +x /root/entrypoint.openxr.sh
27102

28-
ENTRYPOINT ["/root/entrypoint.openxr.sh"]
103+
# When running, to start an interactive session, pass:
104+
# --entrypoint /root/entrypoint.openxr.sh -e "USER_ID=$(id -u)" -e "GROUP_ID=$(id -g)" -v "$MOUNTPOINT:$MOUNTPOINT" -e "CONTAINER_CWD=$MOUNTPOINT"

0 commit comments

Comments
 (0)