From 6a3588d6020e447cfa1f4764809722239589988b Mon Sep 17 00:00:00 2001 From: Etienne Perot Date: Sun, 13 Oct 2024 14:05:22 -0700 Subject: [PATCH] Add temporary documentation on how to preinstall Debian and Python packages. Fixes issue #30 --- .vscode/settings.json | 4 ++++ docs/setup.md | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/.vscode/settings.json b/.vscode/settings.json index 9783292..079e90d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -26,9 +26,11 @@ "getpid", "gotmp", "gvisor", + "iputils", "libc", "libcap", "Lockdown", + "matplotlib", "maxsplit", "memfd", "mknod", @@ -40,6 +42,7 @@ "NOFILE", "noninteractive", "nsswitch", + "numpy", "openwebui", "pacct", "perfmon", @@ -87,6 +90,7 @@ "urandom", "userspace", "webui", + "yfinance", "zswap" ], "[python]": { diff --git a/docs/setup.md b/docs/setup.md index 0dbea2e..6955ae0 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -267,6 +267,27 @@ RUN wget -O /tmp/runsc "https://storage.googleapis.com/gvisor/releases/release/l +### **Optional**: Add packages to Open WebUI `Dockerfile` + +
+To allow code execution sandboxes to use tools or Python packages that aren't part of the Open WebUI container image, you can preinstall them in the `Dockerfile`. +
+ +For example, here is a sample `Dockerfile` that extends the Open WebUI container image and installs the `sudo` and `ping` tools along with some Python packages: + +```Dockerfile +FROM ghcr.io/open-webui/open-webui:main + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get upgrade -y + ### **Optional**: Lockdown for production setups