Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganize sources & introduce WASM SDK #130

Merged
merged 132 commits into from
Nov 11, 2023
Merged
Changes from 1 commit
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
9d7d143
Add support for multiple unique sessions
Zubnix Apr 18, 2023
1fadb2d
Update program args to support single static session id
Zubnix Apr 18, 2023
52066aa
Begin implementing per proxy session i/o
Zubnix Apr 21, 2023
a47aeb0
make multiple proxy sessions work
Zubnix Apr 24, 2023
be362bb
Make cors work & fix tests
Zubnix Apr 24, 2023
1586f56
make closing remote sessions work properly
Zubnix Apr 25, 2023
8c65932
be able to launch child apps based on http url
Zubnix Apr 30, 2023
5742c85
use a signaling connection per launched app
Zubnix May 16, 2023
3d96b43
Rework proxy app launching
Zubnix May 24, 2023
7e3b232
rename client signaling to app context
Zubnix May 25, 2023
ff2da7b
begin separating compositor-proxy as CLI and as lib
Zubnix May 27, 2023
f9a278d
begin separating compositor-proxy as CLI and as lib
Zubnix May 30, 2023
4c906fb
begin separating compositor-proxy as CLI and as lib (more wip)
Zubnix May 31, 2023
f877355
rub some tailwindcss on the demo compositor
Zubnix Jun 1, 2023
594bd37
rub some more tailwindcss on the demo compositor (wip)
Zubnix Jun 8, 2023
d57369c
rub some more tailwindcss on the demo compositor (wip)
Zubnix Jun 8, 2023
4251927
Fix socket reconnection bug when proxy instances is restarted
Zubnix Jun 8, 2023
53f1ce7
Update deps
Zubnix Jun 12, 2023
1ab708f
Update cosmetics
Zubnix Jun 12, 2023
9d798ca
Update yarn from v1 to v3
Zubnix Jun 12, 2023
dd8de93
Update yarn from v1 to v3
Zubnix Jun 12, 2023
6b8225f
migrate (nearly) all interaction to node websockets
Zubnix Jun 18, 2023
32cabf0
migrate (nearly) all interaction to node websockets
Zubnix Jun 20, 2023
ed48a13
migrate (nearly) all interaction to node websockets
Zubnix Jun 20, 2023
f635021
migrate (nearly) all interaction to node websockets
Zubnix Jun 20, 2023
082b874
add some basic auth and move some code around
Zubnix Jun 22, 2023
1e1c2ba
Begin updating docs
Zubnix Jun 22, 2023
a3aaaaf
updating docs
Zubnix Jun 22, 2023
6883bdf
doc update & chrome webgl fix
Zubnix Jun 27, 2023
e141d48
use a separate app mapping file
Zubnix Jun 27, 2023
6e4494a
Immediately adjust feedback timer ticks
Zubnix Jun 29, 2023
aa74886
Make sure we can decode high level h264 on the client
Zubnix Jun 29, 2023
2cd03f2
Fix XWayland apps not being able to launch as first app
Zubnix Jun 29, 2023
b4c611b
start adding webapp demos
Zubnix Aug 31, 2023
0420517
Start restructuring project
Zubnix Sep 13, 2023
19ae07d
update gitignore
Zubnix Sep 13, 2023
0251464
more yarn workspace configuration
Zubnix Sep 13, 2023
710eda8
more wip
Zubnix Sep 14, 2023
d168c1c
more wip
Zubnix Sep 14, 2023
dc42335
wip
Zubnix Sep 15, 2023
e173681
add sdk to monorepo
Zubnix Sep 15, 2023
a135ad5
move stuff around
Zubnix Sep 15, 2023
e5f25ff
wip
Zubnix Sep 15, 2023
3376b20
wip
Zubnix Sep 16, 2023
3bb4b2a
wip
Zubnix Sep 17, 2023
9ea6c2c
add gitignores
Zubnix Sep 18, 2023
8ad46c4
make sdk work on mac
Zubnix Sep 19, 2023
de14706
make shell deps work
Zubnix Sep 19, 2023
1f3972c
make shell work
Zubnix Sep 19, 2023
1bfa799
make shell work
Zubnix Sep 19, 2023
3dfd18f
fix xtsb build, fix compositor wasm libs
Zubnix Sep 19, 2023
2ca3316
Fix shell worker resolution
Zubnix Sep 19, 2023
e962a1d
Fix shell stuff
Zubnix Sep 19, 2023
92cf76f
more wip
Zubnix Sep 20, 2023
327d61a
more wip
Zubnix Sep 20, 2023
8a97af7
more wip
Zubnix Sep 20, 2023
b84b011
more wip
Zubnix Sep 22, 2023
faa98ce
Make web apps work
Zubnix Sep 23, 2023
eec89ab
Make web apps work
Zubnix Sep 25, 2023
c601160
more wip
Zubnix Sep 25, 2023
7236758
more wip
Zubnix Sep 26, 2023
5178d85
add ffmpeg h264 decoder
Zubnix Sep 26, 2023
d16378e
fix sdk build on linux
Zubnix Sep 27, 2023
943c7a8
streamline webapp & remoteapp launcher
Zubnix Sep 27, 2023
aad5c16
add starter jekyll site
Zubnix Sep 27, 2023
33cbc20
remove ffmpeg git repo
Zubnix Sep 27, 2023
6a433b6
update site config
Zubnix Sep 27, 2023
dc64990
docs site fiddling
Zubnix Sep 28, 2023
6e0979b
update site config
Zubnix Sep 28, 2023
68bff56
update shell
Zubnix Sep 28, 2023
f093e6d
update shell
Zubnix Sep 30, 2023
aa47f07
split out compositor-proxy into lib & cli package
Zubnix Oct 1, 2023
86cb809
more wip
Zubnix Oct 3, 2023
77f28fd
more wip
Zubnix Oct 3, 2023
efe4cbc
more wip
Zubnix Oct 4, 2023
1499500
more wip
Zubnix Oct 4, 2023
52c7f01
begin adding docs site layout
Zubnix Oct 4, 2023
07f6a9e
update gitignore
Zubnix Oct 4, 2023
50f5399
more wip
Zubnix Oct 5, 2023
2a29be2
more wip
Zubnix Oct 5, 2023
24234f0
more wip
Zubnix Oct 5, 2023
7877401
more wip
Zubnix Oct 6, 2023
eaa467e
more wip
Zubnix Oct 6, 2023
03c08a7
more wip
Zubnix Oct 6, 2023
79edc87
more wip
Zubnix Oct 6, 2023
c6ee002
more wip
Zubnix Oct 6, 2023
bab96e6
more wip
Zubnix Oct 7, 2023
5c384ad
more wip
Zubnix Oct 10, 2023
1f7fbe5
more wip
Zubnix Oct 10, 2023
6911592
more wip
Zubnix Oct 10, 2023
8445d6b
more wip
Zubnix Oct 10, 2023
2201841
more wip
Zubnix Oct 11, 2023
ddec939
more wip
Zubnix Oct 11, 2023
3714025
more wip
Zubnix Oct 11, 2023
b8fd366
more wip
Zubnix Oct 11, 2023
02cb0fd
more wip
Zubnix Oct 13, 2023
0cd7e6a
more wip
Zubnix Oct 13, 2023
6cc2c8a
more wip
Zubnix Oct 13, 2023
f3f8ed6
more wip
Zubnix Oct 15, 2023
ec73f88
more wip
Zubnix Oct 16, 2023
ae3d428
more wip
Zubnix Oct 21, 2023
377095b
more wip
Zubnix Oct 22, 2023
0a71d39
more wip
Zubnix Oct 22, 2023
74a4402
more wip
Zubnix Oct 24, 2023
ba39d7a
more wip
Zubnix Oct 24, 2023
d885a09
more wip
Zubnix Nov 11, 2023
2f2eecb
more wip
Zubnix Oct 25, 2023
60bcc34
more wip
Zubnix Oct 25, 2023
b6f4332
more wip
Zubnix Oct 25, 2023
05ffbb4
more wip
Zubnix Oct 26, 2023
2de66d0
more wip
Zubnix Oct 27, 2023
71da5ee
more wip
Zubnix Oct 27, 2023
3e1696a
more wip
Zubnix Oct 31, 2023
eb7952f
more wip
Zubnix Oct 31, 2023
fe8b98d
more wip
Zubnix Oct 31, 2023
4dc0f06
more wip
Zubnix Oct 31, 2023
cd5a8f0
more wip
Zubnix Nov 1, 2023
e2e0972
more wip
Zubnix Nov 1, 2023
fbf9db7
more wip
Zubnix Nov 2, 2023
ad71c85
more wip
Zubnix Nov 2, 2023
53f7853
more wip
Zubnix Nov 2, 2023
0cc8f0b
more wip
Zubnix Nov 2, 2023
8fb3399
more wip
Zubnix Nov 3, 2023
4f851ae
more wip
Zubnix Nov 4, 2023
a8940d5
more wip
Zubnix Nov 4, 2023
ccd146b
more wip
Zubnix Nov 5, 2023
8d3ca26
more wip
Zubnix Nov 6, 2023
f4e2132
more wip
Zubnix Nov 6, 2023
3c7b92e
more wip
Zubnix Nov 7, 2023
a760722
more wip
Zubnix Nov 8, 2023
62e4f2e
Create CNAME
Zubnix Nov 11, 2023
b0e6ca1
more wip
Zubnix Nov 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
more wip
Zubnix committed Nov 11, 2023
commit 4f851ae651e9a60567c7a28d1afebc9c69d4f2bb
112 changes: 15 additions & 97 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# syntax=docker/dockerfile:1
FROM debian:bookworm-20231030-slim as BUILD
ARG TARGETARCH
ENV NODE_VERSION="v20.9.0"
ENV NODE_DISTRO="linux-${TARGETARCH}"

WORKDIR /app

@@ -21,107 +19,27 @@ COPY ["packages/compositor-proxy/native/", "./packages/compositor-proxy/native/"
COPY ["packages/compositor-proxy/src/", "./packages/compositor-proxy/src/"]

COPY ["packages/compositor-proxy-cli/package.json", "./packages/compositor-proxy-cli/package.json"]
COPY ["packages/compositor-proxy-cli/tsconfig.json", "./packages/compositor-proxy-cli/"]
COPY ["packages/compositor-proxy-cli/tsconfig.json", "./packages/compositor-proxy-cli/tsconfig.json"]
COPY ["packages/compositor-proxy-cli/src/", "./packages/compositor-proxy-cli/src/"]

RUN apt-get update && apt-get install -y --no-install-recommends \
cmake \
build-essential \
ninja-build \
pkg-config \
libffi-dev \
libudev-dev \
libgbm-dev \
libdrm-dev \
libegl-dev \
libopengl-dev \
libglib2.0-dev \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
libgstreamer-plugins-bad1.0-dev \
libgraphene-1.0-dev \
git \
python3 \
python3-distutils \
curl \
ca-certificates \
flex \
bison \
liborc-0.4-dev-bin \
pipx \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& git clone --depth 1 --branch 1.20 https://gitlab.freedesktop.org/gstreamer/gstreamer.git \
&& cd gstreamer \
&& pipx run meson build \
--buildtype=release \
--strip \
-Dgpl=enabled \
-Dorc=enabled \
-Dbase=enabled \
-Dgood=enabled \
-Dbad=enabled \
-Dugly=enabled \
-Dauto_features=disabled \
-Dgst-plugins-base:app=enabled \
-Dgst-plugins-base:gl=enabled \
-Dgst-plugins-base:gl-graphene=enabled \
-Dgst-plugins-base:gl_winsys=egl \
-Dgst-plugins-base:gl_api=opengl \
-Dgst-plugins-bad:gl=enabled \
-Dgst-plugins-bad:nvcodec=enabled \
&& ninja -C build
RUN curl https://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION-$NODE_DISTRO.tar.xz --output node-$NODE_VERSION-$NODE_DISTRO.tar.xz \
&& tar xvf node-$NODE_VERSION-$NODE_DISTRO.tar.xz
ENV PATH="/app/node-$NODE_VERSION-$NODE_DISTRO/bin:$PATH"
RUN corepack enable \
&& yarn install
RUN yarn workspace @gfld/xtsb build
RUN yarn workspace @gfld/compositor-proxy build
RUN yarn workspace @gfld/compositor-proxy-cli build
RUN yarn workspace @gfld/compositor-proxy-cli package
COPY ["docker/compositor-proxy-cli-build.sh", "./compositor-proxy-cli-build.sh"]
RUN ./compositor-proxy-cli-build.sh

FROM debian:bookworm-20231030-slim

COPY --from=BUILD /app/gstreamer/build/subprojects/gst-plugins-bad/sys/nvcodec/libgstnvcodec.so /usr/lib/${TARGETARCH}-linux-gnu/gstreamer-1.0/libgstnvcodec.so
COPY docker/10_nvidia.json /usr/share/glvnd/egl_vendor.d/10_nvidia.json
WORKDIR /app
COPY --from=BUILD /app/packages/compositor-proxy-cli/package/* .
COPY docker/docker-entrypoint.sh .
COPY packages/compositor-proxy-cli/wait-until-ready.sh .

RUN sed -i'' -e 's/main$/main contrib non-free/g' /etc/apt/sources.list.d/debian.sources \
&& apt-get update && apt-get install -y --no-install-recommends \
libffi8 \
libudev1 \
libgbm1 \
libgraphene-1.0-0 \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly \
gstreamer1.0-gl \
libosmesa6 \
libdrm2 \
libopengl0 \
libglvnd0 \
libglx0 \
libglapi-mesa \
libegl1-mesa \
libglx-mesa0 \
libnvidia-egl-wayland1 \
libnvidia-egl-gbm1 \
xwayland \
xauth \
xxd \
inotify-tools \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /var/run/compositor-proxy-cli && chown 1000:1000 /var/run/compositor-proxy-cli && touch /var/run/compositor-proxy-cli/starting \
&& groupadd --gid 1000 user && useradd --uid 1000 --gid user --shell /bin/bash --create-home user \
&& chown -R 1000:1000 /app
COPY --from=BUILD ["/app/gstreamer/build/subprojects/gst-plugins-bad/sys/nvcodec/libgstnvcodec.so", "./libgstnvcodec.so"]
COPY --from=BUILD ["/app/packages/compositor-proxy-cli/package/*", "./"]
COPY ["docker/docker-entrypoint.sh", "./docker-entrypoint.sh"]
COPY ["packages/compositor-proxy-cli/wait-until-ready.sh", "./wait-until-ready.sh"]
COPY ["docker/10_nvidia.json", "./10_nvidia.json"]

COPY ["docker/compositor-proxy-cli-install.sh", "./compositor-proxy-cli-install.sh"]
RUN ./compositor-proxy-cli-install.sh && rm compositor-proxy-cli-install.sh

RUN groupadd --gid 1000 user && useradd --uid 1000 --gid user --shell /bin/bash --create-home user
ENV HOME=/home/user
WORKDIR "$HOME"

USER 1000
ENTRYPOINT ["sh", "/app/docker-entrypoint.sh"]
71 changes: 71 additions & 0 deletions docker/compositor-proxy-cli-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#!/usr/bin/env bash
set -e

if [ -z "$TARGETARCH" ]; then
printf "TARGETARCH must be set by docker build. Exiting.\n"
exit 1;
fi

NODE_VERSION="v20.9.0"
NODE_DISTRO=linux-$(if [ "$TARGETARCH" == "amd64" ];then printf "x64"; else printf "%s" "$TARGETARCH"; fi)

printf "building for arch %s\n" "$ARCH"

apt-get update
apt-get install -y --no-install-recommends \
cmake \
build-essential \
ninja-build \
pkg-config \
libffi-dev \
libudev-dev \
libgbm-dev \
libdrm-dev \
libegl-dev \
libopengl-dev \
libglib2.0-dev \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
libgstreamer-plugins-bad1.0-dev \
libgraphene-1.0-dev \
git \
python3 \
python3-distutils \
curl \
ca-certificates \
flex \
bison \
liborc-0.4-dev-bin \
pipx
apt-get autoremove -y
apt-get clean
rm -rf /var/lib/apt/lists/*
git clone --depth 1 --branch 1.20 https://gitlab.freedesktop.org/gstreamer/gstreamer.git
cd gstreamer
pipx run meson build \
--buildtype=release \
--strip \
-Dgpl=enabled \
-Dorc=enabled \
-Dbase=enabled \
-Dgood=enabled \
-Dbad=enabled \
-Dugly=enabled \
-Dauto_features=disabled \
-Dgst-plugins-base:app=enabled \
-Dgst-plugins-base:gl=enabled \
-Dgst-plugins-base:gl-graphene=enabled \
-Dgst-plugins-base:gl_winsys=egl \
-Dgst-plugins-base:gl_api=opengl \
-Dgst-plugins-bad:gl=enabled \
-Dgst-plugins-bad:nvcodec=enabled
ninja -C build
curl https://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION-"$NODE_DISTRO".tar.xz --output node-$NODE_VERSION-"$NODE_DISTRO".tar.xz \
&& tar xvf node-$NODE_VERSION-"$NODE_DISTRO".tar.xz
export PATH="$PWD/node-$NODE_VERSION-$NODE_DISTRO/bin:$PATH"
corepack enable
yarn install
yarn workspace @gfld/xtsb build
yarn workspace @gfld/compositor-proxy build
yarn workspace @gfld/compositor-proxy-cli build
yarn workspace @gfld/compositor-proxy-cli package
39 changes: 39 additions & 0 deletions docker/compositor-proxy-cli-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env bash
set -e

ARCH=$(uname -m)

mkdir -p /usr/share/glvnd/egl_vendor.d
mv "$PWD"/10_nvidia.json /usr/share/glvnd/egl_vendor.d/10_nvidia.json
mkdir -p "/usr/lib/$ARCH-linux-gnu/gstreamer-1.0/"
mv "$PWD"/libgstnvcodec.so "/usr/lib/$ARCH-linux-gnu/gstreamer-1.0/libgstnvcodec.so"

sed -i'' -e 's/main$/main contrib non-free/g' /etc/apt/sources.list.d/debian.sources
apt-get update && apt-get install -y --no-install-recommends \
libffi8 \
libudev1 \
libgbm1 \
libgraphene-1.0-0 \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly \
gstreamer1.0-gl \
libosmesa6 \
libdrm2 \
libopengl0 \
libglvnd0 \
libglx0 \
libglapi-mesa \
libegl1-mesa \
libglx-mesa0 \
libnvidia-egl-wayland1 \
libnvidia-egl-gbm1 \
xwayland \
xauth \
xxd \
inotify-tools
apt-get autoremove -y
apt-get clean
mkdir -p /var/run/compositor-proxy-cli && chown 1000:1000 /var/run/compositor-proxy-cli && touch /var/run/compositor-proxy-cli/starting
chown -R 1000:1000 /app
6 changes: 4 additions & 2 deletions docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/env sh
#!/bin/env bash
set -e
touch "$XAUTHORITY"
xauth add "${HOST}":1 . "$(xxd -l 16 -p /dev/urandom)"
./compositor-proxy-cli "$@"

BASEDIR=$(dirname "$0")
"$BASEDIR"/compositor-proxy-cli "$@"
6 changes: 0 additions & 6 deletions examples/docker-compose/alacritty/10_nvidia.json

This file was deleted.

35 changes: 0 additions & 35 deletions examples/docker-compose/alacritty/Dockerfile

This file was deleted.

32 changes: 0 additions & 32 deletions examples/docker-compose/alacritty/alacritty.yml

This file was deleted.

20 changes: 0 additions & 20 deletions examples/docker-compose/applications.json

This file was deleted.

Loading