lablup / lablup/backend.ai

Progress report for pulling images and session creation

Open
#227 2 comments 0 reactions 1 assignee Claimed by @fregataa View on GitHub
Dominant language
Python
Stars
670
Forks
183
Avg merge
17h 7m
Merged PRs (30d)
358

Description

Let's add explicit progress reports when creating a new session.

For cluster sessions, multiple agents may try to pull the image at the same time,so the pull progress should include both per-agent progress and total progress.

- **Manager**
- Spawn a background task when creating a new session, returning the task ID to the client after `max_wait` seconds.
- Let the background task relay the `kernel_pull_progress` events.

- **Agent**
- Add a progress reporter argument to `AbstractAgent.pull_image()` and let the concrete implementations report the progress from the underlying backend (e.g., the docker API).
- Implement the progress report to produce `kernel_pull_progress` events.

- **Client (Python & Javascript)**
- Check the existence of the task ID in the create-kernel API response.
- If it exists, show a progress bar reflecting its progress stream.

FYI: Using the following code snippet, we can keep track of the overall progress in percent: [https://gist.github.com/achimnol/11fd2b379ad186cf624307b2c7e0953f](https://gist.github.com/achimnol/11fd2b379ad186cf624307b2c7e0953f)

JIRA Issue: BA-300

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.