No description
  • C 59.1%
  • C++ 35.8%
  • Makefile 2.8%
  • Dockerfile 1.6%
  • CMake 0.7%
Find a file
Piotr Stankiewicz 337da3eac5 Fix build on RockyLinux
Signed-off-by: Piotr Stankiewicz <piotr.stankiewicz@docker.com>
2024-09-20 10:48:35 +02:00
.github/workflows Add RockyLinux to build pipeline 2024-09-20 09:32:14 +02:00
include Expose preinit for use by runwasi and change socket location 2024-06-17 09:10:18 +02:00
src Make runtime build on debian 11 and rocky 8.9 2024-09-20 09:25:59 +02:00
third_party Add Dawn as a submodule 2024-06-17 09:34:14 +02:00
.gitignore Ignore out* directories 2024-06-17 14:46:29 +02:00
.gitmodules Add Dawn as a submodule 2024-06-17 09:34:14 +02:00
0001-DO-NOT-SUBMIT.patch Bump Dawn 2024-04-09 12:50:50 +02:00
0001-Fix-build-on-alpine.patch Support build on alpine + cleanup 2024-06-05 13:57:11 +02:00
0001-Fix-build-on-debian-11.patch Make runtime build on debian 11 and rocky 8.9 2024-09-20 09:25:59 +02:00
0001-Fix-build-on-RockyLinux-8.9.patch Make runtime build on debian 11 and rocky 8.9 2024-09-20 09:25:59 +02:00
0001-Make-fetch_dawn_dependencies.py-work-with-python-3.6.patch Fix build on RockyLinux 2024-09-20 10:48:35 +02:00
CMakeLists.txt Switch library build to cmake 2024-06-17 14:45:24 +02:00
demo.Dockerfile Support build on alpine + cleanup 2024-06-05 13:57:11 +02:00
libwebgpu-glibc.Dockerfile Use DBC to build Linux artifacts 2024-09-12 14:56:43 +02:00
libwebgpu-musl.Dockerfile Use DBC to build Linux artifacts 2024-09-12 14:56:43 +02:00
Makefile Remove any additional API surface 2024-04-10 12:40:59 +02:00
README.md Add some instructions on building the client code 2023-09-14 16:21:31 +02:00
runtime-debian.Dockerfile Make runtime build on debian 11 and rocky 8.9 2024-09-20 09:25:59 +02:00
runtime-rocky.Dockerfile Fix build on RockyLinux 2024-09-20 10:48:35 +02:00

Docker Desktop WebGPU runtime

Structure

This repo contains code needed to built the Docker Desktop WebGPU runtime. The runtime is spit into two parts:

  • the server - meant to run on the host system and expose GPU capabilities to the client (currently only buildable and tested on macOS);
  • the client - a shared library which will be shipped in the Docker Desktop VM image, which provides the WebGPU symbols as specified in webgpu.h and a couple of additional calls needed to initialise the runtime (buildable and tested on macOS and Linux).

Aside from these the repo contains examples of how to use libwebgpudd.so (currently matmul.cpp, build target matmul-dd).

Building host binaries

The Docker Desktop WebGPU runtime is built on top of Dawn (https://dawn.googlesource.com/dawn) so start by downloading and building it. To do that, follow instructions in https://dawn.googlesource.com/dawn/+/HEAD/docs/building.md .

Once that is done you can build the Docker Desktop WebGPU runtime by running:

DAWN_BUILD_DIR=<path to the Dawn build> make

To build just the client library:

DAWN_BUILD_DIR=<path to the Dawn build> make libwebgpudd

To build the server:

DAWN_BUILD_DIR=<path to the Dawn build> make server

To build the matrix multiplication example code:

DAWN_BUILD_DIR=<path to the Dawn build> make matmul-dd

Building DD binaries

To build the client side of webgpudd simply run:

docker build .

For now this creates an image with libwebgpu and examples installed. Instructions on how to use the examples also get installed in the image. Don't forget to run:

./out/server

on the host before running the example code inside DD.

Running samples on macOS

First start the server:

./out/server

The server will print ready to receive connections when it is ready to work.

Then run:

LIBRARY_PATH=./out ./out/matmul-dd

Once the client is done running close it with ^C, this will terminate the client and server.