gcharanteja commited on
Commit
79f9c57
·
1 Parent(s): 39d80d4
Files changed (1) hide show
  1. Dockerfile +5 -3
Dockerfile CHANGED
@@ -19,9 +19,10 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt
19
  # 5. Copy application code
20
  COPY --chown=user . /app
21
 
22
- # 6. Create the data directory and set permissions for 'user'
23
- # This ensures that even if /data is mounted empty, user can write to it
24
- RUN mkdir -p /data/chroma_db && chown -R user:user /data
 
25
 
26
  # 7. Switch to non-root user
27
  USER user
@@ -30,4 +31,5 @@ USER user
30
  EXPOSE 7860
31
 
32
  # 9. Start ChromaDB
 
33
  CMD ["chroma", "run", "--path", "/data/chroma_db", "--host", "0.0.0.0", "--port", "7860"]
 
19
  # 5. Copy application code
20
  COPY --chown=user . /app
21
 
22
+ # 6. Fix Permissions:
23
+ # Ensure /app is writable by user (for logs)
24
+ # Ensure /data is writable by user (for DB)
25
+ RUN chown -R user:user /app /data && chmod -R 755 /app /data
26
 
27
  # 7. Switch to non-root user
28
  USER user
 
31
  EXPOSE 7860
32
 
33
  # 9. Start ChromaDB
34
+ # We explicitly set the log config to default (console) to avoid file permission issues
35
  CMD ["chroma", "run", "--path", "/data/chroma_db", "--host", "0.0.0.0", "--port", "7860"]