Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from overhangio:master #169

Merged
merged 2 commits into from
Nov 8, 2023
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
1 change: 1 addition & 0 deletions changelog.d/20231106_202213_codewithemad.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- [Improvement] Install tutor development tools with `pip install tutor[dev]`. (by @CodeWithEmad)
25 changes: 25 additions & 0 deletions docs/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,28 @@ This issue should only happen in development mode. Long story short, it can be s
tutor dev run lms ./manage.py lms waffle_switch block_structure.invalidate_cache_on_publish on --create

If you'd like to learn more, please take a look at `this Github issue <https://github.com/overhangio/tutor/issues/302>`__.

High resource consumption on ``tutor images build`` by docker
-------------------------------------------------------------

This issue can occur when building multiple images simultaneously by Docker, issue specifically related to BuildKit.


Create a buildkit.toml configuration file with the following contents::

[worker.oci]
max-parallelism = 2

This configuration file limits the number of layers built concurrently to 2, which can significantly reduce resource consumption.

Create a builder that uses this configuration::

docker buildx create --use --name=<name> --driver=docker-container --config=/path/to/buildkit.toml

Replace <name> with a suitable name for your builder, and ensure that you specify the correct path to the buildkit.toml configuration file.

Now build again::

tutor images build

All build commands should now make use of the newly configured builder. To later revert to the default builder, run ``docker buildx use default``.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def is_requirement(line: str) -> bool:
python_requires=">=3.8",
install_requires=load_requirements("base.in"),
extras_require={
"dev": load_requirements("dev.txt"),
"full": load_requirements("plugins.txt"),
},
entry_points={"console_scripts": ["tutor=tutor.commands.cli:main"]},
Expand Down