Update Dockerfile
Browse files- 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 |
-
#
|
| 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 |
-
#
|
|
|
|
|
|
|
|
|
|
| 28 |
EXPOSE 8501
|
| 29 |
EXPOSE 8000
|
| 30 |
|
| 31 |
-
#
|
| 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 |
-
#
|
| 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"]
|