Add support for a new curve data format in the Curves package converter system
日本語の概要は準備中です。原文の説明を表示しています。
Add a Docker container to a Datagrok package with Dockerfile and config
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Help the user add a Docker container to their Datagrok package so it can be built, deployed, and accessed via the platform.
/create-docker-container [package-name]
Follow these steps to create a Docker container for a Datagrok package:
Create a dockerfiles/ folder inside the package root and add a Dockerfile there.
EXPOSE $PORT (only one EXPOSE is allowed).Example structure:
packages/MyPackage/
dockerfiles/
Dockerfile
container.json (optional)
src/
package.json
Place container.json in the same directory as the Dockerfile. If omitted, defaults are used.
{
"cpu": 1.5,
"gpu": 1,
"memory": 2048,
"on_demand": true,
"shutdown_timeout": 60,
"storage": 25,
"env": {
"CONN": "#{x.Package:Entity}",
"LOGIN": "login"
}
}
Configuration properties and defaults:
| Property | Type | Default | Description |
|---|---|---|---|
| cpu | Double | 0.25 | CPU cores allocated |
| gpu | Integer | 0 | GPU devices reserved |
| memory | Integer | 512 | RAM in megabytes |
| on_demand | Boolean | false | Start container only on first request |
| shutdown_timeout | Integer | null | Idle minutes before auto-shutdown |
| storage | Integer | 21 | Disk storage in gigabytes |
| shm_size | Integer | 64 | Shared memory in megabytes |
| env | Object | Environment variables passed to the container | |
| image | String | Published image to run instead of building one | |
| port | Integer | Port the container listens on (EXPOSE when built here) |
Set image when the image is already published — built by a CI pipeline, kept in another
repository, or a stock third-party image. The folder then needs no Dockerfile at all, and
grok publish builds and pushes nothing:
{
"image": "datagrok/jkg_python:bleeding-edge",
"port": 8888,
"on_demand": true
}
Set port alongside it — with no Dockerfile there is no EXPOSE to read. A folder holding
both a Dockerfile and an image is built from the Dockerfile.
For env values, use #{x.Package:Entity} to pass a JSON-serialized entity from a package namespace. Credentials are only passed for connections within the same package.
Get the container ID and use fetchProxy to call the container's HTTP server:
const containerId = (await grok.dapi.docker.dockerContainers.filter('my-container').first()).id;
const params = {
method: 'POST',
headers: {'Accept': 'application/json', 'Content-Type': 'application/json'},
body: JSON.stringify(payload),
};
const response: Response = await grok.dapi.docker.dockerContainers.fetchProxy(containerId, '/endpoint', params);
const result = await response.json();
The params object follows the standard RequestInit interface.
const ws: WebSocket = await grok.dapi.docker.dockerContainers.webSocketProxy(container.id, '/ws');
ws.send('Hello');
ws.addEventListener('message', (event: MessageEvent) => {
console.log(event.data);
});
setTimeout(() => ws.close(), 3000);
webpack
grok publish dev
A return code of 0 indicates successful deployment. After publishing, Datagrok queues the image for building automatically.
In Datagrok, go to Platform -> Dockers to view containers and images. Status indicators:
Right-click a card to start/stop containers or rebuild images. Check logs via the Property pane.
dockerfiles/ directory, Dockerfile, and optionally container.json.fetchProxy.webSocketProxy.EXPOSE port is allowed in the Dockerfile.grok-spawner must be running in the same environment.まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Add support for a new curve data format in the Curves package converter system
日本語の概要は準備中です。原文の説明を表示しています。
Create info panels that appear in the context panel based on semantic types
日本語の概要は準備中です。原文の説明を表示しています。
Add a new single-objective optimization algorithm to the sci-comp library. Use when the user asks to implement a new optimizer (e.g. gradient descent, BFGS, simulated annealing, differential evolution).
日本語の概要は準備中です。原文の説明を表示しています。
Add unit tests to a Datagrok package
日本語の概要は準備中です。原文の説明を表示しています。
Answer a "how do I …" question about the platform with a Gherkin scenario on @datagrok-libraries/bdd that is filmed into a how-to video (grok-bdd guide), so the answer is demonstrated, sent as a video plus numbered steps, and kept as a regression test
日本語の概要は準備中です。原文の説明を表示しています。
Translate hand-written Playwright specs (or any existing UI tests) into Gherkin features on @datagrok-libraries/bdd, then prove the features test what they claim by backward-matching them against the originals with independent reviewers, and fix the gaps in the core, the library and the features
日本語の概要は準備中です。原文の説明を表示しています。