RAG_Chatbot / Dockerfile
shahzad4894's picture
Update Dockerfile
21c3db6 verified
raw
history blame
680 Bytes
FROM python:3.11.13-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy only requirements first (for caching)
COPY requirements.txt ./
# Install Python dependencies
RUN pip3 install --no-cache-dir -r requirements.txt
# Copy application code
COPY src/ ./src/
EXPOSE 8501
# Healthcheck for Hugging Face container
HEALTHCHECK --interval=30s --timeout=5s --retries=3 CMD curl --fail http://localhost:8501/_stcore/health || exit 1
# Run Streamlit
ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]