ЯRаСлав
commited on
Commit
·
1d95250
1
Parent(s):
efc1b48
Docker config update.
Browse files- Dockerfile +18 -7
- docker-compose.yml +4 -2
- start.sh +6 -12
Dockerfile
CHANGED
@@ -1,13 +1,24 @@
|
|
1 |
FROM ghcr.io/open-webui/open-webui:ollama
|
2 |
|
3 |
-
#
|
4 |
-
|
|
|
5 |
|
6 |
-
|
|
|
|
|
7 |
RUN mkdir -p /data/ollama && \
|
8 |
mkdir -p /data/webui && \
|
9 |
-
ln -
|
10 |
-
ln -
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
-
#
|
13 |
-
CMD ["bash", "
|
|
|
1 |
FROM ghcr.io/open-webui/open-webui:ollama
|
2 |
|
3 |
+
# Set up proper paths for Hugging Face
|
4 |
+
ENV OLLAMA_HOST=0.0.0.0
|
5 |
+
WORKDIR /app
|
6 |
|
7 |
+
EXPOSE 7860
|
8 |
+
|
9 |
+
# Create symbolic links for persistent storage
|
10 |
RUN mkdir -p /data/ollama && \
|
11 |
mkdir -p /data/webui && \
|
12 |
+
ln -sf /data/ollama /root/.ollama && \
|
13 |
+
ln -sf /data/webui /app/backend/data
|
14 |
+
|
15 |
+
# Copy custom start script
|
16 |
+
COPY start.sh /app/start.sh
|
17 |
+
RUN chmod +x /app/start.sh
|
18 |
+
|
19 |
+
# Health check
|
20 |
+
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
21 |
+
CMD curl -f http://localhost:8080 || exit 1
|
22 |
|
23 |
+
# Run the start script
|
24 |
+
CMD ["/bin/bash", "/app/start.sh"]
|
docker-compose.yml
CHANGED
@@ -4,11 +4,13 @@ services:
|
|
4 |
webui:
|
5 |
build: .
|
6 |
ports:
|
7 |
-
- "
|
8 |
volumes:
|
9 |
- ollama_data:/data/ollama
|
10 |
- webui_data:/data/webui
|
11 |
-
|
|
|
|
|
12 |
|
13 |
volumes:
|
14 |
ollama_data:
|
|
|
4 |
webui:
|
5 |
build: .
|
6 |
ports:
|
7 |
+
- "7860:7860" # Hugging Face requires external:internal port to match
|
8 |
volumes:
|
9 |
- ollama_data:/data/ollama
|
10 |
- webui_data:/data/webui
|
11 |
+
environment:
|
12 |
+
- WEBUI_PORT=7860
|
13 |
+
restart: unless-stopped
|
14 |
|
15 |
volumes:
|
16 |
ollama_data:
|
start.sh
CHANGED
@@ -1,15 +1,9 @@
|
|
1 |
#!/bin/bash
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
mongod &
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
echo "[start.sh] Waiting for model to become healthy..." ⏳
|
12 |
-
curl --retry 60 --retry-delay 10 --retry-connrefused http://127.0.0.1:8080/health
|
13 |
-
|
14 |
-
echo "[start.sh] Launching WebUI..." 🌐
|
15 |
-
dotenv -e /app/.env -c -- node /app/build/index.js -- --host 0.0.0.0 --port 3000
|
|
|
1 |
#!/bin/bash
|
2 |
|
3 |
+
# Start Ollama in background
|
4 |
+
echo "Starting Ollama..."
|
5 |
+
ollama serve &
|
|
|
6 |
|
7 |
+
# Start Open WebUI (correct path based on official image)
|
8 |
+
echo "Starting Open WebUI..."
|
9 |
+
exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
|
|
|
|
|
|
|
|
|
|