[PR #2016] [CLOSED] fix: DRY + speed up docker build #20863

Closed
opened 2026-04-20 03:13:58 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/2016
Author: @akx
Created: 5/6/2024
Status: Closed

Base: devHead: docker-setup-cleanup


📝 Commits (1)

  • fc20b40 fix: DRY + speed up docker build

📊 Changes

2 files changed (+40 additions, -39 deletions)

View changed files

📝 Dockerfile (+3 -39)
backend/docker_setup.sh (+37 -0)

📄 Description

Description

This PR:

  • Refactors the Dockerfile to use an in-container setup script instead of commands being mashed into RUN statements.
  • DRYs out the repeated package lists, PyTorch package index URL determination etc.
  • Switches to using uv for installing Torch as well (it's faster!)
  • Adds a check that the functionality to pre-load whisper and embedding models actually works

This should have no effect for the end user other than a possibly slightly smaller image.
For developers, this is easier to maintainer.
For CI and builders, this is faster.

Testing & review

I checked that an image built with and without USE_OLLAMA works as before.

I didn't check the CUDA configuration, since I have no CUDA-enabled Docker hardware at hand right now.


Changelog Entry

Changed

  • Optimized Docker build a bit.

🔄 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-webui/pull/2016 **Author:** [@akx](https://github.com/akx) **Created:** 5/6/2024 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `docker-setup-cleanup` --- ### 📝 Commits (1) - [`fc20b40`](https://github.com/open-webui/open-webui/commit/fc20b40019f679f7a5be19ab4e9b2cc396d707fa) fix: DRY + speed up docker build ### 📊 Changes **2 files changed** (+40 additions, -39 deletions) <details> <summary>View changed files</summary> 📝 `Dockerfile` (+3 -39) ➕ `backend/docker_setup.sh` (+37 -0) </details> ### 📄 Description ## Description This PR: * Refactors the Dockerfile to use an in-container setup script instead of commands being mashed into `RUN` statements. * DRYs out the repeated package lists, PyTorch package index URL determination etc. * Switches to using `uv` for installing Torch as well (it's faster!) * Adds a check that the functionality to pre-load whisper and embedding models actually works This should have no effect for the end user other than a possibly slightly smaller image. For developers, this is easier to maintainer. For CI and builders, this is faster. ## Testing & review I checked that an image built with and without `USE_OLLAMA` works as before. I didn't check the CUDA configuration, since I have no CUDA-enabled Docker hardware at hand right now. --- ### Changelog Entry ### Changed - Optimized Docker build a bit. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 03:13:58 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#20863