Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
21 changes: 0 additions & 21 deletions .github/workflows/lint-test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,6 @@ jobs:
- run: npm --workspaces run build
- run: npm run lint

lint-docs-examples:
needs: [build-lib, build-lib-node, build-server]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
- uses: actions/cache@v5
with:
path: |
~/.npm
~/.cache/Cypress
key: npm-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- run: npm ci
- run: npm --workspace={discojs,discojs-node,server} run build
- run: npm run lint
working-directory: docs/examples

build-lib:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -128,8 +109,6 @@ jobs:
steps:
- uses: actions/checkout@v6
- uses: docker/setup-buildx-action@v4
with:
install: true
- run: docker build .
- run: |
docker build --quiet --load . | \
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ FROM node:22 AS builder
WORKDIR /disco

COPY package*.json .
COPY isomorphic-wrtc/package.json isomorphic-wrtc/
COPY discojs/package.json discojs/
COPY discojs-node/package.json discojs-node/
COPY server/package.json server/
RUN npm ci

COPY isomorphic-wrtc/ isomorphic-wrtc/
COPY discojs/ discojs/
COPY discojs-node/ discojs-node/
COPY tsconfig.base.json .
Expand All @@ -22,11 +24,13 @@ FROM node:22-slim AS runner
WORKDIR /disco

COPY --link --from=builder /disco/package*.json /disco/
COPY --link --from=builder /disco/isomorphic-wrtc/package.json isomorphic-wrtc/
COPY --link --from=builder /disco/discojs/package.json discojs/
COPY --link --from=builder /disco/discojs-node/package.json discojs-node/
COPY --link --from=builder /disco/server/package.json server/
RUN npm --omit=dev ci

COPY --link --from=builder /disco/isomorphic-wrtc/ isomorphic-wrtc/
COPY --link --from=builder /disco/discojs/dist/ discojs/dist/
COPY --link --from=builder /disco/discojs-node/dist/ discojs-node/dist/
COPY --link --from=builder /disco/server/dist/ server/dist/
Expand Down
2 changes: 1 addition & 1 deletion discojs-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"homepage": "https://github.com/epfml/disco#readme",
"dependencies": {
"@epfml/discojs": "*",
"@roamhq/wrtc": "0.9",
"@roamhq/wrtc": "0.10",
"@tensorflow/tfjs-node": "4",
"csv-parse": "6",
"sharp": "0.34"
Expand Down
36 changes: 0 additions & 36 deletions docs/examples/eslint.config.js

This file was deleted.

45 changes: 21 additions & 24 deletions docs/examples/package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
{
"name": "examples",
"private": true,
"type": "module",
"description": "In `training.ts` we give a brief example of discojs, in it we run two clients training jointly via federated learning. It trains on a few examples of the [face task](https://www.kaggle.com/datasets/frabbisw/facial-age), the samples are already stored in the repo and so it is not necessary to download any additional data.",
"scripts": {
"train": "npm run build && node dist/training.js",
"custom_task": "npm run build && node dist/custom_task.js",
"language_model": "npm run build && node dist/wikitext.js",
"benchmark_gpt": "npm run build && node dist/benchmark_gpt.js",
"build": "tsc",
"lint": "npx eslint .",
"test": "npm run train"
},
"license": "ISC",
"dependencies": {
"server": "*",
"@epfml/discojs": "*",
"@epfml/discojs-node": "*"
},
"devDependencies": {
"eslint": "10",
"typescript": "5",
"typescript-eslint": "8"
}
"name": "examples",
"private": true,
"type": "module",
"description": "In `training.ts` we give a brief example of discojs, in it we run two clients training jointly via federated learning. It trains on a few examples of the [face task](https://www.kaggle.com/datasets/frabbisw/facial-age), the samples are already stored in the repo and so it is not necessary to download any additional data.",
"scripts": {
"train": "npm run build && node dist/training.js",
"custom_task": "npm run build && node dist/custom_task.js",
"language_model": "npm run build && node dist/wikitext.js",
"benchmark_gpt": "npm run build && node dist/benchmark_gpt.js",
"build": "tsc",
"test": "npm run train"
},
"license": "ISC",
"dependencies": {
"server": "*",
"@epfml/discojs": "*",
"@epfml/discojs-node": "*"
},
"devDependencies": {
"typescript": "5"
}
}
3 changes: 0 additions & 3 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ export default defineConfigWithVueTs(
allowDefaultProject: [
"eslint.config.js",
"isomorphic-wrtc/{{browser,node}.js,types.d.ts}",
// "isomorphic-wrtc/browser.js",
// "isomorphic-wrtc/node.js",
// "isomorphic-wrtc/types.d.ts",
"testSetupImportTFJSNode.ts",
"vitest.config.ts",
],
Expand Down
2 changes: 1 addition & 1 deletion isomorphic-wrtc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Allow to load a different WebRTC implementation depending on the platform.

* on node, load node-datachannel, a C++ plugin
* on node, load @roamhq/wrtc, a C++ plugin
* in browser, simply exposes the available WebRTC implementation

It allows to simply `import wrct from 'isomorphic-wrtc'` and get the same coding experience.
Expand Down
2 changes: 1 addition & 1 deletion isomorphic-wrtc/node.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import wrtc from "node-datachannel/polyfill"
import wrtc from "@roamhq/wrtc"
export default wrtc
34 changes: 17 additions & 17 deletions isomorphic-wrtc/package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"name": "@epfml/isomorphic-wrtc",
"version": "1.0.0",
"description": "Isomorphic implementation of WebRTC",
"type": "module",
"main": "node.js",
"browser": "browser.js",
"types": "types.d.ts",
"author": "",
"license": "MIT",
"scripts": {
"build": ": nothing",
"lint": ": nothing",
"test": ": nothing"
},
"peerDependencies": {
"node-datachannel": "*"
}
"name": "@epfml/isomorphic-wrtc",
"version": "1.0.0",
"description": "Isomorphic implementation of WebRTC",
"type": "module",
"main": "node.js",
"browser": "browser.js",
"types": "types.d.ts",
"author": "",
"license": "MIT",
"scripts": {
"build": ": nothing",
"lint": ": nothing",
"test": ": nothing"
},
"peerDependencies": {
"@roamhq/wrtc": "*"
}
}
Loading