Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +8 -5
Dockerfile
CHANGED
|
@@ -1,16 +1,19 @@
|
|
| 1 |
-
# 1. Base Image
|
| 2 |
FROM ghcr.io/open-webui/open-webui:main
|
| 3 |
|
| 4 |
# 2. Environment Variables
|
| 5 |
ENV PORT=7860
|
| 6 |
ENV OLLAMA_BASE_URL=http://localhost:11434
|
| 7 |
-
# Save Ollama models to the data folder so they persist (if you use HF Storage)
|
| 8 |
ENV OLLAMA_MODELS=/app/backend/data/ollama
|
| 9 |
|
| 10 |
-
# 3.
|
| 11 |
USER root
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
RUN curl -fsSL https://ollama.com/install.sh | sh
|
| 13 |
|
| 14 |
-
#
|
| 15 |
-
# Starts Ollama in background -> Waits 10s -> Starts WebUI
|
| 16 |
CMD bash -c "ollama serve & sleep 10 && /app/backend/start.sh"
|
|
|
|
| 1 |
+
# 1. Base Image
|
| 2 |
FROM ghcr.io/open-webui/open-webui:main
|
| 3 |
|
| 4 |
# 2. Environment Variables
|
| 5 |
ENV PORT=7860
|
| 6 |
ENV OLLAMA_BASE_URL=http://localhost:11434
|
|
|
|
| 7 |
ENV OLLAMA_MODELS=/app/backend/data/ollama
|
| 8 |
|
| 9 |
+
# 3. Switch to root
|
| 10 |
USER root
|
| 11 |
+
|
| 12 |
+
# 4. FIX: Install 'zstd' which is required for Ollama installation
|
| 13 |
+
RUN apt-get update && apt-get install -y zstd
|
| 14 |
+
|
| 15 |
+
# 5. Install Ollama
|
| 16 |
RUN curl -fsSL https://ollama.com/install.sh | sh
|
| 17 |
|
| 18 |
+
# 6. Start Ollama (background) -> Wait -> Start WebUI
|
|
|
|
| 19 |
CMD bash -c "ollama serve & sleep 10 && /app/backend/start.sh"
|