|
|
|
FROM python:3.11-slim |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
RUN mkdir -p /app/generated_outputs && \ |
|
mkdir -p /app/generated_charts && \ |
|
mkdir -p /app/cache && \ |
|
chmod -R 777 /app/generated_outputs && \ |
|
chmod -R 777 /app/generated_charts && \ |
|
chmod -R 777 /app/cache |
|
|
|
|
|
RUN touch /app/pandasai.log && \ |
|
touch /app/api_key_rotation.log && \ |
|
chmod 666 /app/pandasai.log && \ |
|
chmod 666 /app/api_key_rotation.log |
|
|
|
|
|
ENV MPLCONFIGDIR=/app/cache |
|
|
|
|
|
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 ["uvicorn", "controller:app", "--host", "0.0.0.0", "--port", "7860"] |