Spaces:
Sleeping
Sleeping
| # Use Python 3.10 because torch 2.1.0 doesn't support 3.13 | |
| FROM python:3.10-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Install system dependencies needed for sentencepiece + builds | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| cmake \ | |
| pkg-config \ | |
| curl \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements and source files | |
| COPY requirements.txt ./ | |
| COPY . . | |
| # Upgrade pip and install Python dependencies | |
| RUN pip3 install --upgrade pip | |
| RUN pip3 install -r requirements.txt | |
| # Expose Streamlit port | |
| EXPOSE 8501 | |
| # Healthcheck (optional but good practice) | |
| HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1 | |
| # Start your Streamlit app | |
| ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] | |