Spaces:
Sleeping
Sleeping
| # syntax=docker/dockerfile:1 | |
| FROM python:3.10-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements and install Python dependencies | |
| COPY requirements.txt ./ | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Grant write permissions to entire /app | |
| RUN chmod -R a+w /app | |
| # Copy application code | |
| COPY . . | |
| # Ensure output directory exists and is writable | |
| RUN mkdir -p output \ | |
| && chmod -R 777 output | |
| # Expose Streamlit default port | |
| EXPOSE 8501 | |
| # # Streamlit configuration | |
| # ENV STREAMLIT_SERVER_PORT=8501 \ | |
| # STREAMLIT_SERVER_ADDRESS=0.0.0.0 | |
| # # Launch the app | |
| # CMD ["streamlit", "run", "app.py"] | |
| ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] |