Spaces:
Running
Running
Naimul Islam Nahid commited on
Update Dockerfile
Browse files- Dockerfile +0 -19
Dockerfile
CHANGED
|
@@ -1,31 +1,12 @@
|
|
| 1 |
-
# Use the official OpenWebUI image
|
| 2 |
FROM ghcr.io/open-webui/open-webui:main
|
| 3 |
|
| 4 |
-
# -----------------------------------------------------------------
|
| 5 |
-
# CRITICAL FIX: Run as root.
|
| 6 |
-
# Hugging Face mounts Storage Buckets with root ownership.
|
| 7 |
-
# Running as root ensures OpenWebUI has permission to write the database.
|
| 8 |
-
# -----------------------------------------------------------------
|
| 9 |
USER root
|
| 10 |
|
| 11 |
-
# Ensure the data directory exists
|
| 12 |
-
RUN mkdir -p /app/backend/data
|
| 13 |
-
|
| 14 |
-
# Set networking environment variables for Hugging Face
|
| 15 |
ENV PORT=7860
|
| 16 |
ENV HOST=0.0.0.0
|
| 17 |
-
|
| 18 |
-
# Point the data directory to the Storage Bucket mount path
|
| 19 |
-
ENV DATA_DIR=/app/backend/data
|
| 20 |
-
|
| 21 |
-
# -----------------------------------------------------------------
|
| 22 |
-
# RESOURCE LIMITATION (Max 95% usage to prevent overloading)
|
| 23 |
-
# -----------------------------------------------------------------
|
| 24 |
ENV WEBUI_WORKERS=1
|
| 25 |
ENV MALLOC_ARENA_MAX=2
|
| 26 |
|
| 27 |
-
# Expose the required port
|
| 28 |
EXPOSE 7860
|
| 29 |
|
| 30 |
-
# Start the application
|
| 31 |
CMD ["bash", "start.sh"]
|
|
|
|
|
|
|
| 1 |
FROM ghcr.io/open-webui/open-webui:main
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
USER root
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
ENV PORT=7860
|
| 6 |
ENV HOST=0.0.0.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
ENV WEBUI_WORKERS=1
|
| 8 |
ENV MALLOC_ARENA_MAX=2
|
| 9 |
|
|
|
|
| 10 |
EXPOSE 7860
|
| 11 |
|
|
|
|
| 12 |
CMD ["bash", "start.sh"]
|