triflix commited on
Commit
f86972d
Β·
verified Β·
1 Parent(s): 9d0c78a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -35
Dockerfile CHANGED
@@ -1,43 +1,16 @@
1
  # ============================================================
2
  # HuggingFace Space: Ollama + Open WebUI (CPU, 16GB RAM)
3
- # Port 7860 exposed β€” Generic LLM GUI for latest models
4
  # ============================================================
5
 
6
- FROM ubuntu:22.04
7
 
8
- # Avoid interactive prompts during build
9
- ENV DEBIAN_FRONTEND=noninteractive
10
- ENV OLLAMA_HOST=0.0.0.0:11434
11
- ENV OLLAMA_MODELS=/data/models
12
- ENV DATA_DIR=/data
13
 
14
- # ── Install system deps (zstd is REQUIRED by Ollama installer) ──
15
- RUN apt-get update && apt-get install -y \
16
- curl \
17
- wget \
18
- python3 \
19
- python3-pip \
20
- git \
21
- ca-certificates \
22
- zstd \
23
- && rm -rf /var/lib/apt/lists/*
24
-
25
- # ── Install Ollama (now zstd is present βœ…) ─────────────────
26
- RUN curl -fsSL https://ollama.com/install.sh | sh
27
-
28
- # ── Install Open WebUI ──────────────────────────────────────
29
- RUN pip3 install open-webui
30
-
31
- # ── Create data directories ─────────────────────────────────
32
- RUN mkdir -p /data/models /data/webui
33
-
34
- # ── Copy startup script ─────────────────────────────────────
35
- COPY start.sh /start.sh
36
- RUN chmod +x /start.sh
37
-
38
- # HuggingFace Spaces expects port 7860
39
  EXPOSE 7860
40
 
41
- ENV WEBUI_DATA_DIR=/data/webui
42
-
43
- CMD ["/start.sh"]
 
1
  # ============================================================
2
  # HuggingFace Space: Ollama + Open WebUI (CPU, 16GB RAM)
3
+ # Uses official pre-built image β€” no manual installs needed!
4
  # ============================================================
5
 
6
+ FROM ghcr.io/open-webui/open-webui:ollama
7
 
8
+ # ── HuggingFace Spaces requires port 7860 ──────────────────
9
+ ENV PORT=7860
10
+ ENV OLLAMA_BASE_URL=http://localhost:11434
11
+ ENV WEBUI_AUTH=False
 
12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  EXPOSE 7860
14
 
15
+ # Official image already has its own start.sh that boots
16
+ # both Ollama + Open WebUI β€” we just override the port above