Spaces:
Sleeping
Sleeping
Mieszko Makuch
commited on
Commit
·
d6f9fe0
1
Parent(s):
f26343d
Configure AnythingLLM Docker for Hugging Face Spaces
Browse files- Create proper Dockerfile with user permissions for HF Spaces
- Configure AnythingLLM to run on port 7860
- Set up environment variables for AnythingLLM
- Update README.md with app_port configuration
- Remove incorrectly named app.py file
- Dockerfile +24 -0
- README.md +1 -0
- app.py +0 -11
Dockerfile
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM mintplexlabs/anythingllm:latest
|
| 2 |
+
|
| 3 |
+
# Create user with ID 1000 for Hugging Face Spaces
|
| 4 |
+
RUN useradd -m -u 1000 user
|
| 5 |
+
|
| 6 |
+
# Set environment variables for AnythingLLM
|
| 7 |
+
ENV PORT=7860
|
| 8 |
+
ENV SERVER_PORT=7860
|
| 9 |
+
ENV STORAGE_DIR=/data
|
| 10 |
+
ENV DISABLE_TELEMETRY=true
|
| 11 |
+
ENV NO_DEBUG=true
|
| 12 |
+
|
| 13 |
+
# Create data directory with proper permissions
|
| 14 |
+
RUN mkdir -p /data && \
|
| 15 |
+
chown -R user:user /data
|
| 16 |
+
|
| 17 |
+
# Set working directory to user's home
|
| 18 |
+
WORKDIR /home/user
|
| 19 |
+
|
| 20 |
+
# Switch to user
|
| 21 |
+
USER user
|
| 22 |
+
|
| 23 |
+
# AnythingLLM already has its ENTRYPOINT/CMD configured
|
| 24 |
+
# The base image will handle starting the application on the configured port
|
README.md
CHANGED
|
@@ -4,6 +4,7 @@ emoji: 🔥
|
|
| 4 |
colorFrom: yellow
|
| 5 |
colorTo: purple
|
| 6 |
sdk: docker
|
|
|
|
| 7 |
pinned: false
|
| 8 |
short_description: anythingllm
|
| 9 |
---
|
|
|
|
| 4 |
colorFrom: yellow
|
| 5 |
colorTo: purple
|
| 6 |
sdk: docker
|
| 7 |
+
app_port: 7860
|
| 8 |
pinned: false
|
| 9 |
short_description: anythingllm
|
| 10 |
---
|
app.py
DELETED
|
@@ -1,11 +0,0 @@
|
|
| 1 |
-
FROM mintplexlabs/anythingllm:latest
|
| 2 |
-
|
| 3 |
-
# Hugging Face Docker Spaces oczekują, że aplikacja słucha na porcie 7860
|
| 4 |
-
ENV PORT=7860
|
| 5 |
-
|
| 6 |
-
# Katalog na dane AnythingLLM
|
| 7 |
-
ENV STORAGE_DIR=/data
|
| 8 |
-
RUN mkdir -p /data
|
| 9 |
-
|
| 10 |
-
# Obraz AnythingLLM ma już swój ENTRYPOINT/CMD,
|
| 11 |
-
# więc nic więcej nie musimy tu robić.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|