Skip to content

Commit

Permalink
Add temporary documentation on how to preinstall Debian and Python pa…
Browse files Browse the repository at this point in the history
…ckages.

Fixes issue #30
  • Loading branch information
EtiennePerot committed Oct 13, 2024
1 parent 0d13de2 commit 6a3588d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@
"getpid",
"gotmp",
"gvisor",
"iputils",
"libc",
"libcap",
"Lockdown",
"matplotlib",
"maxsplit",
"memfd",
"mknod",
Expand All @@ -40,6 +42,7 @@
"NOFILE",
"noninteractive",
"nsswitch",
"numpy",
"openwebui",
"pacct",
"perfmon",
Expand Down Expand Up @@ -87,6 +90,7 @@
"urandom",
"userspace",
"webui",
"yfinance",
"zswap"
],
"[python]": {
Expand Down
21 changes: 21 additions & 0 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,27 @@ RUN wget -O /tmp/runsc "https://storage.googleapis.com/gvisor/releases/release/l

</details>

### **Optional**: Add packages to Open WebUI `Dockerfile`

<details>
<summary>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`.</summary>
<br/>

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 </dev/null && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
iputils-ping sudo \
</dev/null && \
pip install matplotlib yfinance numpy
```

</details>

### **Optional**: Lockdown for production setups

<details>
Expand Down

0 comments on commit 6a3588d

Please sign in to comment.