[PR #36] [CLOSED] Package installs with uv + core-requirements.txt #114

Closed
opened 2026-10-18 21:10:55 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-terminal/pull/36
Author: @Burhan-Q
Created: 3/8/2026
Status: ❌ Closed

Base: main ← Head: use-uv


📝 Commits (3)

  • 047eff3 Create core-requirements.txt
  • 3b64a8d use uv for package installs
  • c05127a add uv in entrypoint.sh

📊 Changes

3 files changed (+33 additions, -12 deletions)

View changed files

📝 Dockerfile (+7 -11)
➕ core-requirements.txt (+25 -0)
📝 entrypoint.sh (+1 -1)

📄 Description

Changed Dockerfile to use uv for package installs. Layers build 65% faster with change and ~4% smaller image size after build.

Original pip build stages (main)

 => [ 5/12] WORKDIR /app                                                        0.1s 
 => [ 6/12] COPY core-requirements.txt .                                        0.1s 
 => [ 7/12] RUN pip install --no-cache-dir -r core-requirements.txt             50.4s 
 => [ 8/12] COPY . .                                                            0.1s 
 => [ 9/12] RUN pip install --no-cache-dir .                                    7.9s 

Total = 58.9 seconds

IMAGE                                    ID             DISK USAGE
open-terminal:latest                     df1a1453479b       3.61GB

New uv build stages (this PR)

 => CACHED [5/13] WORKDIR /app                                                         0.0s
 => [6/13] COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv               0.1s
 => [7/13] COPY core-requirements.txt .                                                0.1s
 => [8/13] RUN uv pip install --no-cache-dir --system -r core-requirements.txt         16.9s
 => [9/13] COPY . .                                                                    0.1s 
 => [10/13] RUN uv pip install --no-cache-dir --system .                               3.4s 

Total = 20.6 seconds

IMAGE                                    ID             DISK USAGE
open-terminal:latest                     da538ded7b0f       3.48GB

Additionally I moved the packages for installation from the Dockerfile, into a new core-requirements.txt file. Thought it might be cleaner and easier to read for anyone who wants to tweak the packages for the build, instead of during the entrypoint.sh script. Made the copy and run separate from the project install to avoid cache changes if only the project dependencies are changed. I also updated the entrypoint.sh script to also use uv for consistency.

I didn't see anywhere else that looked like this would impact, but I could've missed something. Figured cutting down the build time would be useful.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-terminal/pull/36 **Author:** [@Burhan-Q](https://github.com/Burhan-Q) **Created:** 3/8/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `use-uv` --- ### 📝 Commits (3) - [`047eff3`](https://github.com/open-webui/open-terminal/commit/047eff349cc104ee7cd8d785773044f1564810be) Create core-requirements.txt - [`3b64a8d`](https://github.com/open-webui/open-terminal/commit/3b64a8dd9daecb27e8c014847190b3c25b19c7b1) use uv for package installs - [`c05127a`](https://github.com/open-webui/open-terminal/commit/c05127a95088af88522d0f659c55a98eff8c2c68) add `uv` in entrypoint.sh ### 📊 Changes **3 files changed** (+33 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `Dockerfile` (+7 -11) ➕ `core-requirements.txt` (+25 -0) 📝 `entrypoint.sh` (+1 -1) </details> ### 📄 Description Changed Dockerfile to use `uv` for package installs. Layers build 65% faster with change and ~4% smaller image size after build. ### Original `pip` build stages (main) ``` => [ 5/12] WORKDIR /app 0.1s => [ 6/12] COPY core-requirements.txt . 0.1s => [ 7/12] RUN pip install --no-cache-dir -r core-requirements.txt 50.4s => [ 8/12] COPY . . 0.1s => [ 9/12] RUN pip install --no-cache-dir . 7.9s ``` Total = 58.9 seconds ``` IMAGE ID DISK USAGE open-terminal:latest df1a1453479b 3.61GB ``` ### New `uv` build stages (this PR) ``` => CACHED [5/13] WORKDIR /app 0.0s => [6/13] COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv 0.1s => [7/13] COPY core-requirements.txt . 0.1s => [8/13] RUN uv pip install --no-cache-dir --system -r core-requirements.txt 16.9s => [9/13] COPY . . 0.1s => [10/13] RUN uv pip install --no-cache-dir --system . 3.4s ``` Total = 20.6 seconds ``` IMAGE ID DISK USAGE open-terminal:latest da538ded7b0f 3.48GB ``` Additionally I moved the packages for installation from the Dockerfile, into a new `core-requirements.txt` file. Thought it might be cleaner and easier to read for anyone who wants to tweak the packages for the build, instead of during the `entrypoint.sh` script. Made the copy and run separate from the project install to avoid cache changes if only the project dependencies are changed. I also updated the `entrypoint.sh` script to also use `uv` for consistency. I didn't see anywhere else that looked like this would impact, but I could've missed something. Figured cutting down the build time would be useful. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-18 21:10:55 +00:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/open-terminal#114
No description provided.