| |
| FROM python:3.11-slim |
|
|
| |
| |
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| curl \ |
| gcc \ |
| g++ \ |
| libgomp1 \ |
| libpango-1.0-0 \ |
| libpangoft2-1.0-0 \ |
| libcairo2 \ |
| libgdk-pixbuf-2.0-0 \ |
| libjpeg62-turbo-dev \ |
| libopenjp2-7-dev \ |
| libffi-dev \ |
| fonts-dejavu \ |
| fonts-liberation \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| |
| RUN mkdir -p /app/output \ |
| /app/chat_pdfs \ |
| /app/temp_reports \ |
| /app/generated_charts \ |
| /app/cache |
|
|
| |
| |
| RUN chmod -R 777 /app/output \ |
| /app/chat_pdfs \ |
| /app/temp_reports \ |
| /app/generated_charts \ |
| /app/cache |
|
|
| |
| RUN touch /app/pandasai.log /app/api_key_rotation.log && \ |
| chmod 666 /app/pandasai.log /app/api_key_rotation.log |
|
|
| |
| ENV MPLCONFIGDIR=/app/cache |
| ENV PYTHONUNBUFFERED=1 |
|
|
| |
| COPY requirements.txt . |
| RUN pip install --no-cache-dir -r requirements.txt |
|
|
| |
| COPY . . |
|
|
| |
| RUN chown -R 1000:1000 /app && chmod -R 777 /app |
|
|
| |
| EXPOSE 7860 |
|
|
| |
| CMD bash -c "while true; do curl -s https://code-api-executor.hf.space/ping >/dev/null && sleep 300; done & python controller.py" |