Spaces:
Runtime error
Runtime error
| # Use an official Python runtime as the base image | |
| FROM python:3.11-slim | |
| # Set working directory in the container | |
| WORKDIR /app | |
| # Copy project files | |
| COPY app.py utils.py agents.py tasks.py requirements.txt ./ | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| gcc \ | |
| libffi-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Expose port 7860 for Gradio | |
| EXPOSE 7860 | |
| # Set environment variables | |
| ENV CREWAI_TELEMETRY_ENABLED=false | |
| ENV CREWAI_STORAGE_DIR=/tmp/crewai | |
| ENV CREWAI_DB_PATH=/tmp/crewai/crewai.db | |
| ENV CREWAI_MEMORY_ENABLED=false | |
| ENV HF_HOME=/tmp/huggingface_cache | |
| ENV TRANSFORMERS_CACHE=/tmp/huggingface_cache | |
| ENV HF_HUB_CACHE=/tmp/huggingface_cache | |
| ENV GRADIO_SERVER_NAME=0.0.0.0 | |
| ENV GRADIO_SERVER_PORT=7860 | |
| # Create necessary directories | |
| RUN mkdir -p /tmp/crewai | |
| RUN mkdir -p /tmp/huggingface_cache | |
| RUN chmod 777 /tmp/huggingface_cache | |
| RUN chmod 777 /tmp/crewai | |
| # Command to run the Gradio app | |
| CMD ["python", "app.py"] | |