Refactor Docker Images, Evaluator Images Simple CI#823
Refactor Docker Images, Evaluator Images Simple CI#823JersyJ wants to merge 34 commits intomrlvsb:masterfrom
Conversation
… refine Docker images and build processes.
…:latest` tag from `kelvin/` parent image names in build script.
…PU, and CUDA workers, and update the evaluator Dockerfile entrypoint for command flexibility.
There was a problem hiding this comment.
Pull request overview
Refactors Kelvin’s Docker image setup (app + evaluator images) and CI workflows, while also updating developer tooling (switching from pre-commit to prek) and improving evaluator worker runtime behavior for Docker-based deployments.
Changes:
- Reworked multiple Docker images (base/run/java/dotnet/clang-tidy/cargo/pythonrun) and added an evaluator worker image + build script.
- Updated pipeline configuration/validation to allow selecting a Docker image for the
testspipe. - Updated CI caching strategy and developer tooling/docs (uv dependency groups, prek hooks).
Reviewed changes
Copilot reviewed 30 out of 31 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| web/views/student.py | String formatting style adjustments. |
| uv.lock | Removes pre-commit deps, adds prek, updates locked metadata. |
| pyproject.toml | Migrates dev deps to [dependency-groups], adds prek. |
| frontend/src/PipelineValidation.js | Adds tests.image validation + description. |
| evaluator/testsets.py | Adjusts warning f-string quoting. |
| evaluator/pipelines.py | Adds configurable tests image and changes docker ulimit formatting. |
| evaluator/images/run/Dockerfile | Refactors apt install (leaner image, cleanup). |
| evaluator/images/pythonrun/Dockerfile | Switches base + pins pytest/flake8. |
| evaluator/images/java/entry.py | Removes runtime env-variable injection logic. |
| evaluator/images/java/Dockerfile | Refactors installs and sets JAVA/Maven env via ENV. |
| evaluator/images/gcc/entry.py | Adjusts PATH f-string quoting. |
| evaluator/images/gcc/Dockerfile | Minor formatting cleanup. |
| evaluator/images/dotnet/Dockerfile | Uses kelvin/base:latest, refactors apt install, adds env workaround. |
| evaluator/images/clang-tidy/Dockerfile | Switches from Alpine to Debian-based kelvin/gcc and installs tools via apt. |
| evaluator/images/cargo/entry.py | Adjusts warning string formatting. |
| evaluator/images/cargo/Dockerfile | Refactors apt install, bumps bleach. |
| evaluator/images/build.py | Major refactor into an image dependency scanner/builder CLI. |
| evaluator/images/base/Dockerfile | Consolidates base deps, locale env, and bleach install. |
| evaluator/Dockerfile | Adds a dedicated evaluator worker image that installs Docker CLI/engine packages. |
| docs/docs/01-intro/01-installation.mdx | Updates installation steps for prek + worker command. |
| docker-compose.yml | Adds internal base URL env, nginx aliasing, and evaluator worker services. |
| common/utils.py | Adds API_INTERNAL_BASEURL handling with DEBUG guard. |
| common/event_log.py | Fixes f-string quoting in __str__. |
| common/evaluate.py | Adds DEBUG TLS verify override and ensures temp dir is under system temp /tmp/kelvin. |
| api/views/default.py | Adjusts error f-string quoting. |
| Dockerfile | Reworks build/runtime stages, uv installation method, runtime deps, and user/group creation. |
| .pre-commit-config.yaml | Updates hook versions and consolidates ruff hooks. |
| .github/workflows/ci.yml | Uses job defaults for deployment_service; switches Docker cache to GHA. |
| .github/workflows/build-evaluator-images.yml | Adds workflow to build evaluator images when relevant files change. |
| .env.example | Documents API_INTERNAL_BASEURL and evaluator worker envs. |
| .dockerignore | Expands ignore patterns for Python/Node/editor artifacts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…tation, and change default image in TestsPipe
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 30 out of 31 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…te Dockerfile comments for clarity
498b373 to
0199ceb
Compare
Kobzol
left a comment
There was a problem hiding this comment.
Please separate a PR that only changes the CI, let's start with that.
| # On PRs, we need everything to be green, while deploy jobs are skipped. | ||
| # On master, we need everything to be green. | ||
| # ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB! | ||
| conclusion: |
There was a problem hiding this comment.
The conclusion job won't work like this, I think I wrote it to you before. We either have to merge the two workflows, or use a different name for the conclusion job here (e.g. conclusion-images), so that we can configure CI to wait for both jobs to be green.
| on: | ||
| pull_request: | ||
| merge_group: | ||
| workflow_dispatch: |
There was a problem hiding this comment.
The main issue that we have with the images is not that they break after we change them, but that they break when something external changes, most often apt repositories. So it would be great to run CI periodically to detect that sooner.
One way of doing that is running them always in CI, without file change detection. That has the annoying property that it can break CI for unrelated PRs. Another possibility is to setup a cron, to run this e.g. once a week. I'd go with the cron for now (in addition to the existing triggers).
| uses: docker/build-push-action@v6 | ||
| with: | ||
| cache-from: type=registry,ref=ghcr.io/mrlvsb/kelvin-ci-cache | ||
| cache-from: type=gha |
There was a problem hiding this comment.
Due to maintenance of the registry storage (LRU is used there automatically) and also the readability/visibility of that registry. Also this is official way and recommendation from GitHub and Docker.
EVALUATOR_CPU_REPLICAS)EVALUATOR_CUDA_REPLICAS)EVALUATOR_REDIS__HOSTEVALUATOR_REDIS__PORTAPI_INTERNAL_BASEURL)prek