mirror of
https://github.com/andrewyng/openworker.git
synced 2026-11-20 20:37:44 +00:00
Allow developers to easily build AI apps without worrying about the harness part. Bundles the Rust agent runtime as a SDK (Rust and TypeScript) for building desktop and web applications. Applications can manage a local harness or connect to an authenticated harness service on k8s with separately scaled workers and sandbox execution. The implementation is primarily contained in harness/, with deployment tooling in deploy/, Markdown guides in docs/harness/guides/, and the static documentation site in docs-site/. It does not replace the existing Python harness or migrate OpenWorker Desktop. Co-authored-by: Devika Verma <devikaverma11@gmail.com>
24 lines
1.1 KiB
Docker
24 lines
1.1 KiB
Docker
# Build from the repository root, with a native Linux helper matching TARGETARCH.
|
|
FROM node:24-bookworm-slim AS build
|
|
WORKDIR /src
|
|
COPY harness/typescript-sdk/package*.json harness/typescript-sdk/
|
|
RUN npm --prefix harness/typescript-sdk ci
|
|
COPY harness/typescript-sdk/ harness/typescript-sdk/
|
|
RUN npm --prefix harness/typescript-sdk run build
|
|
COPY harness/examples/quickstart/ harness/examples/quickstart/
|
|
WORKDIR /src/harness/examples/quickstart
|
|
ENV ELECTRON_SKIP_BINARY_DOWNLOAD=1
|
|
RUN npm ci --ignore-scripts && npm run build && npm prune --omit=dev && npm --prefix ../../typescript-sdk prune --omit=dev
|
|
|
|
FROM node:24-bookworm-slim
|
|
WORKDIR /app
|
|
COPY --from=build /src/harness /harness
|
|
# Supply this file from a matching OpenWorker Linux release/build before docker build.
|
|
COPY harness/examples/quickstart/bin/openworker-harness /usr/local/bin/openworker-harness
|
|
RUN chmod 755 /usr/local/bin/openworker-harness && mkdir /state && chown node:node /state
|
|
USER node
|
|
ENV HOST=0.0.0.0 PORT=8080 OPENWORKER_STATE_DIR=/state OPENWORKER_EXECUTABLE=/usr/local/bin/openworker-harness
|
|
WORKDIR /harness/examples/quickstart
|
|
EXPOSE 8080
|
|
CMD ["node","web/server.mjs"]
|