Spaces:
Sleeping
Sleeping
Gemini
commited on
Commit
·
c360a55
1
Parent(s):
293b6bd
fix: address permission and .env issues
Browse files- Dockerfile +9 -2
Dockerfile
CHANGED
@@ -15,6 +15,9 @@ RUN apt-get update && apt-get install -y \
|
|
15 |
# Create directories
|
16 |
RUN mkdir -p /app/dependencies /app/data/sqlite /app/data/chroma_db /app/logs /app/run /app/resources
|
17 |
|
|
|
|
|
|
|
18 |
# Copy dependency files - Files that rarely change
|
19 |
COPY dependencies/graphrag-1.2.1.dev27.tar.gz /app/dependencies/
|
20 |
COPY dependencies/llama.cpp.zip /app/dependencies/
|
@@ -61,6 +64,9 @@ RUN echo "--- Listing /app/lpm_kernel directory ---" && ls -la /app/lpm_kernel
|
|
61 |
# Copy the start script
|
62 |
COPY start.sh /app/
|
63 |
|
|
|
|
|
|
|
64 |
# Check module import
|
65 |
RUN python -c "import lpm_kernel; print('Module import check passed')"
|
66 |
|
@@ -72,10 +78,11 @@ ENV PYTHONUNBUFFERED=1 \
|
|
72 |
RUN_DIR=/app/run \
|
73 |
RESOURCES_DIR=/app/resources \
|
74 |
APP_ROOT=/app \
|
75 |
-
FLASK_APP=lpm_kernel.app
|
|
|
76 |
|
77 |
# Expose ports
|
78 |
EXPOSE 8002 8080
|
79 |
|
80 |
# Set the startup command
|
81 |
-
CMD ["./start.sh"]
|
|
|
15 |
# Create directories
|
16 |
RUN mkdir -p /app/dependencies /app/data/sqlite /app/data/chroma_db /app/logs /app/run /app/resources
|
17 |
|
18 |
+
# Set permissions for writable directories
|
19 |
+
RUN chmod -R 777 /app/data /app/logs /app/run /app/resources
|
20 |
+
|
21 |
# Copy dependency files - Files that rarely change
|
22 |
COPY dependencies/graphrag-1.2.1.dev27.tar.gz /app/dependencies/
|
23 |
COPY dependencies/llama.cpp.zip /app/dependencies/
|
|
|
64 |
# Copy the start script
|
65 |
COPY start.sh /app/
|
66 |
|
67 |
+
# Copy .env file
|
68 |
+
COPY .env /app/.env
|
69 |
+
|
70 |
# Check module import
|
71 |
RUN python -c "import lpm_kernel; print('Module import check passed')"
|
72 |
|
|
|
78 |
RUN_DIR=/app/run \
|
79 |
RESOURCES_DIR=/app/resources \
|
80 |
APP_ROOT=/app \
|
81 |
+
FLASK_APP=lpm_kernel.app \
|
82 |
+
TRANSFORMERS_CACHE=/app/.cache/huggingface
|
83 |
|
84 |
# Expose ports
|
85 |
EXPOSE 8002 8080
|
86 |
|
87 |
# Set the startup command
|
88 |
+
CMD ["./start.sh"]
|