Spaces:
Build error
Build error
Download Dockerfile from Ani-404/Sentext-analytics: direct link, hf CLI and curl.
- Browser
- Download file 731 Bytes
-
https://huggingface.co/spaces/Ani-404/Sentext-analytics/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Ani-404/Sentext-analytics/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Ani-404/Sentext-analytics/resolve/main/Dockerfile
731 Bytes
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Set environment variables to fix permissions | |
| ENV HOME=/tmp | |
| ENV STREAMLIT_CONFIG_DIR=/tmp/.streamlit | |
| ENV TRANSFORMERS_CACHE=/tmp/.cache | |
| ENV HF_HOME=/tmp/.cache/huggingface | |
| # Copy requirements and install dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application files | |
| COPY . . | |
| # Create necessary directories with proper permissions | |
| RUN mkdir -p /tmp/.streamlit && \ | |
| mkdir -p /tmp/.cache && \ | |
| chmod -R 777 /tmp | |
| # Expose port 7860 (Hugging Face Spaces default) | |
| EXPOSE 7860 | |
| # Run the Streamlit app | |
| CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.headless=true"] |