Skip to content

docs: more specific comments around optimizations - #83

Open
agilgur5 wants to merge 1 commit into
astral-sh:mainfrom
agilgur5:docs-opt-comments-specific
Open

agilgur5 wants to merge 1 commit into
astral-sh:mainfrom
agilgur5:docs-opt-comments-specific

Conversation

@agilgur5

@agilgur5 agilgur5 commented Mar 21, 2026 •

Copy link
Copy Markdown

Summary

The optimizations in the Dockerfile are pretty nuanced, so I think it would be helpful to be more specific on the comments around the uv environment variables

Essentially could detail a bit more from https://docs.astral.sh/uv/guides/integration/docker/#optimizations or link to it in the Dockerfile comments themselves

Details

  • the UV_COMPILE_BYTECODE comment previously didn't say why it was enabled
    • explicitly state the trade-off now
  • the UV_LINK_MODE comment previously didn't specify hard linking and was a bit ambiguous with "it's a mounted volume"
    • symlinks can be used across filesystems -- it's specifically hard links that can't be
    • it wasn't clear what "it's" was referring to, specifically that it references another line below, rather than something above -- i.e. used "it's" before "it" is was defined
    • explicitly specify "hard linking" and say "below cache mount"

These are the exact comments I suggested to a colleague who was following this example in code review in suttacentral/suttacentral#3575 (comment) and suttacentral/suttacentral#3575 (comment)

@agilgur5

agilgur5 commented Jun 3, 2026 •

Copy link
Copy Markdown
Author

@zanieb any chance you or someone else from the team could review this?

- the optimizations are pretty nuanced, so I think it would be helpful to be more specific on these lines
  - could also link to https://docs.astral.sh/uv/guides/integration/docker/#optimizations which has more detail

- the `UV_COMPILE_BYTECODE` comment previously didn't say _why_ it was enabled
  - explicitly state the trade-off now
- the `UV_LINK_MODE` comment previously didn't specify _hard_ linking and was a bit ambiguous about what "mounted volume" it was talking about
  - symlinks [can](https://superuser.com/q/704822/584649) be used across filesystems -- it's specifically _hard_ links that can't be
  - explicitly specify "hard linking" and say "below cache mount"
@agilgur5
agilgur5 force-pushed the docs-opt-comments-specific branch from bab0a8c to 1cc2d85 Compare September 8, 2026 03:54
@agilgur5

agilgur5 commented Sep 8, 2026

Copy link
Copy Markdown
Author

Rebased on top of main and fixed merge conflict with e791995 (which was made a couple months after this PR)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant