Spaces:
Runtime error
Runtime error
| FROM python:3.9-slim | |
| WORKDIR /app | |
| # Create a non-root user | |
| RUN useradd -m -u 1000 user | |
| # Install git, wget, and other utilities | |
| RUN apt-get update && apt-get install -y git wget curl tar gzip && apt-get clean && rm -rf /var/lib/apt/lists/* | |
| # Set ownership for the app directory | |
| RUN mkdir -p /app && chown -R user:user /app | |
| # Switch to the non-root user | |
| USER user | |
| # Clone the repository | |
| RUN git clone https://github.com/Daanworg/cloud-rag-webhook.git /app | |
| # Create data directories | |
| RUN mkdir -p /app/data/chunks /app/data/uploads /app/data/vectors | |
| # Install HF-specific dependencies | |
| RUN pip install --no-cache-dir -U transformers datasets sentence-transformers faiss-cpu gradio torch | |
| # Expose the port the app runs on | |
| EXPOSE 7860 | |
| # Set environment variables | |
| ENV PORT=7860 | |
| # Command to run the app (we'll use placeholder until we create hf_app.py) | |
| CMD ["python", "-c", "import gradio as gr; demo = gr.Interface(fn=lambda x: f'Setup in progress. Check back soon! {x}', inputs='text', outputs='text', title='RAG Document Processing'); demo.launch(server_name='0.0.0.0', server_port=7860)"] | |