JumaRubea commited on
Commit
892b02b
·
verified ·
1 Parent(s): 6033a52

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -9
Dockerfile CHANGED
@@ -13,26 +13,26 @@ RUN apt-get update && apt-get install -y \
13
  sqlite3 \
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
- # Create directory for SQLite DB (e.g., data/chats.db)
17
- RUN mkdir -p /app/data && chmod -R 777 /app/data
18
-
19
- # Copy requirements and source code
20
  COPY requirements.txt ./
21
  COPY src/ ./src/
22
 
23
- # Upgrade pip and install dependencies
24
  RUN pip install --upgrade pip
25
  RUN pip install -r requirements.txt
26
 
27
- # Expose ports for Streamlit and FastAPI
 
 
 
28
  EXPOSE 8501
29
  EXPOSE 8000
30
 
31
- # Set Hugging Face cache directory
32
  ENV HF_HOME=/tmp/huggingface_cache
33
 
34
  # Healthcheck for Streamlit
35
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
36
 
37
- # Entry point to run the Streamlit app
38
- 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 (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
23
 
24
+ # Set correct permissions for SQLite file
25
+ RUN chmod -R 777 /app/src/chats.db
26
+
27
+ # Expose Streamlit and FastAPI ports
28
  EXPOSE 8501
29
  EXPOSE 8000
30
 
31
+ # Huggingface cache
32
  ENV HF_HOME=/tmp/huggingface_cache
33
 
34
  # Healthcheck for Streamlit
35
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
36
 
37
+ # Run the Streamlit app
38
+ ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]