Spaces:
Runtime error
Runtime error
Download Dockerfile from Alamgirapi/CacheRAGS: direct link, hf CLI and curl.
- Browser
- Download file 797 Bytes
-
https://huggingface.co/spaces/Alamgirapi/CacheRAGS/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Alamgirapi/CacheRAGS/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Alamgirapi/CacheRAGS/resolve/main/Dockerfile
797 Bytes
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements and install Python packages | |
| COPY requirements.txt . | |
| RUN pip install --upgrade pip | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Verify streamlit is installed and accessible | |
| RUN which streamlit | |
| RUN streamlit --version | |
| # Copy application code | |
| COPY . . | |
| # Create a non-root user (optional but recommended) | |
| RUN useradd --create-home --shell /bin/bash appuser | |
| RUN chown -R appuser:appuser /app | |
| USER appuser | |
| # Expose port | |
| EXPOSE 7860 | |
| # Command to run the application | |
| CMD ["python", "-m", "streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.headless=true"] |