Spaces:
Runtime error
Runtime error
File size: 901 Bytes
4e6f326 a127900 4e6f326 a127900 4e6f326 a127900 4e6f326 a127900 4e6f326 a127900 4e6f326 a127900 4e6f326 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | FROM python:3.11-slim
# Set environment variables
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
STREAMLIT_SERVER_PORT=7860 \
STREAMLIT_SERVER_ADDRESS=0.0.0.0
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for better caching
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY . .
# Pre-download models to speed up startup and avoid runtime download issues
RUN python3 download_models.py
# Hugging Face Spaces use port 7860 by default
EXPOSE 7860
# Health check to ensure the container is running correctly
HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health
# Run the application
ENTRYPOINT ["streamlit", "run", "multimodal_rag_langgraph_gemini_st.py"]
|