siddhm11 commited on
Commit
c450206
·
1 Parent(s): 2407011

Fix SQLite permissions: writable dir + /tmp DB path for non-root user

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -0
Dockerfile CHANGED
@@ -21,8 +21,14 @@ RUN python -c "from FlagEmbedding import BGEM3FlagModel; BGEM3FlagModel('BAAI/bg
21
  # Copy application code
22
  COPY . .
23
 
 
 
 
24
  # HF Spaces requires port 7860 and non-root user
25
  USER 1000
26
  EXPOSE 7860
27
 
 
 
 
28
  CMD ["python", "run.py"]
 
21
  # Copy application code
22
  COPY . .
23
 
24
+ # Make app dir writable for non-root user (HF Spaces requires USER 1000)
25
+ RUN chmod -R 777 /app
26
+
27
  # HF Spaces requires port 7860 and non-root user
28
  USER 1000
29
  EXPOSE 7860
30
 
31
+ # SQLite must write to a writable path
32
+ ENV DB_PATH=/tmp/interactions.db
33
+
34
  CMD ["python", "run.py"]