Skip to content

Commit 6a3588d

Browse files
committed
Add temporary documentation on how to preinstall Debian and Python packages.
Fixes issue #30
1 parent 0d13de2 commit 6a3588d

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@
2626
"getpid",
2727
"gotmp",
2828
"gvisor",
29+
"iputils",
2930
"libc",
3031
"libcap",
3132
"Lockdown",
33+
"matplotlib",
3234
"maxsplit",
3335
"memfd",
3436
"mknod",
@@ -40,6 +42,7 @@
4042
"NOFILE",
4143
"noninteractive",
4244
"nsswitch",
45+
"numpy",
4346
"openwebui",
4447
"pacct",
4548
"perfmon",
@@ -87,6 +90,7 @@
8790
"urandom",
8891
"userspace",
8992
"webui",
93+
"yfinance",
9094
"zswap"
9195
],
9296
"[python]": {

docs/setup.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,27 @@ RUN wget -O /tmp/runsc "https://storage.googleapis.com/gvisor/releases/release/l
267267

268268
</details>
269269

270+
### **Optional**: Add packages to Open WebUI `Dockerfile`
271+
272+
<details>
273+
<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>
274+
<br/>
275+
276+
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:
277+
278+
```Dockerfile
279+
FROM ghcr.io/open-webui/open-webui:main
280+
281+
RUN apt-get update && \
282+
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y </dev/null && \
283+
DEBIAN_FRONTEND=noninteractive apt-get install -y \
284+
iputils-ping sudo \
285+
</dev/null && \
286+
pip install matplotlib yfinance numpy
287+
```
288+
289+
</details>
290+
270291
### **Optional**: Lockdown for production setups
271292

272293
<details>

0 commit comments

Comments
 (0)