Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +11 -7
Dockerfile
CHANGED
|
@@ -2,21 +2,25 @@ FROM mintplexlabs/anythingllm:latest
|
|
| 2 |
|
| 3 |
USER root
|
| 4 |
|
| 5 |
-
# 1. Create local
|
| 6 |
-
# 2. Create the bucket mount folder
|
| 7 |
-
RUN mkdir -p /app/server/storage /collector/hotdir /app/local_data/lancedb && \
|
| 8 |
chown -R 1000:1000 /app/server/storage /collector/hotdir /app/local_data && \
|
| 9 |
chmod -R 777 /app/server/storage /collector/hotdir /app/local_data
|
| 10 |
|
| 11 |
-
# Environment Variables
|
| 12 |
ENV COLLECTOR_HOTDIR=/collector/hotdir
|
| 13 |
ENV STORAGE_DIR=/app/server/storage
|
| 14 |
-
|
|
|
|
| 15 |
ENV VECTOR_DB_PATH=/app/local_data/lancedb
|
| 16 |
-
ENV
|
|
|
|
| 17 |
|
|
|
|
| 18 |
EXPOSE 7860
|
|
|
|
| 19 |
USER 1000
|
| 20 |
|
| 21 |
-
#
|
| 22 |
CMD ["/bin/bash", "-c", "chmod -R 777 /app/server/storage && /usr/local/bin/docker-entrypoint.sh"]
|
|
|
|
| 2 |
|
| 3 |
USER root
|
| 4 |
|
| 5 |
+
# 1. Create a local folder for Models and Vector DB (Fast SSD)
|
| 6 |
+
# 2. Create the bucket mount folder (Persistent Storage)
|
| 7 |
+
RUN mkdir -p /app/server/storage /collector/hotdir /app/local_data/models /app/local_data/lancedb && \
|
| 8 |
chown -R 1000:1000 /app/server/storage /collector/hotdir /app/local_data && \
|
| 9 |
chmod -R 777 /app/server/storage /collector/hotdir /app/local_data
|
| 10 |
|
| 11 |
+
# Environment Variables - The "Secret Sauce"
|
| 12 |
ENV COLLECTOR_HOTDIR=/collector/hotdir
|
| 13 |
ENV STORAGE_DIR=/app/server/storage
|
| 14 |
+
|
| 15 |
+
# FORCE the heavy/locking stuff to live on the Space's local drive, NOT the bucket
|
| 16 |
ENV VECTOR_DB_PATH=/app/local_data/lancedb
|
| 17 |
+
ENV XENOVA_MODEL_DIR=/app/local_data/models
|
| 18 |
+
ENV SENTENCE_TRANSFORMERS_HOME=/app/local_data/models
|
| 19 |
|
| 20 |
+
ENV SERVER_PORT=7860
|
| 21 |
EXPOSE 7860
|
| 22 |
+
|
| 23 |
USER 1000
|
| 24 |
|
| 25 |
+
# Fix permissions on the mount at runtime and start
|
| 26 |
CMD ["/bin/bash", "-c", "chmod -R 777 /app/server/storage && /usr/local/bin/docker-entrypoint.sh"]
|