JumaRubea commited on
Commit
17aad32
·
verified ·
1 Parent(s): 0f78941

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -2
Dockerfile CHANGED
@@ -13,10 +13,14 @@ RUN apt-get update && apt-get install -y \
13
  sqlite3 \
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
- # Copy requirements and source code (including chats.db inside src/)
17
  COPY requirements.txt ./
18
  COPY src/ ./src/
19
 
 
 
 
 
20
  # Upgrade pip and install Python dependencies
21
  RUN pip install --upgrade pip
22
  RUN pip install -r requirements.txt
@@ -32,4 +36,4 @@ ENV HF_HOME=/tmp/huggingface_cache
32
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
33
 
34
  # Run the Streamlit app
35
- ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
13
  sqlite3 \
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
+ # Copy requirements and source code
17
  COPY requirements.txt ./
18
  COPY src/ ./src/
19
 
20
+ # If chats.db exists in src/, copy it to /data (optional, only if you have a pre-existing db)
21
+ RUN mkdir -p /data && \
22
+ [ -f src/chats.db ] && cp src/chats.db /data/chats.db || true
23
+
24
  # Upgrade pip and install Python dependencies
25
  RUN pip install --upgrade pip
26
  RUN pip install -r requirements.txt
 
36
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
37
 
38
  # Run the Streamlit app
39
+ ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]