FROM python:3.10-slim ENV TZ=Asia/Kolkata RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN apt-get update && apt-get install -y --no-install-recommends \ git gcc python3-dev ffmpeg mediainfo neofetch && \ apt-get clean && rm -rf /var/lib/apt/lists/* WORKDIR /app COPY . . ENV PIP_ROOT_USER_ACTION=ignore RUN pip install --upgrade pip RUN pip install --no-cache-dir -r requirements.txt ##RUN pip install uvicorn fastapi RUN bash installer.sh # Fix for Git's 'dubious ownership' error RUN git config --global --add safe.directory /app # Ensure writable dirs RUN mkdir -p /app/sessions && chmod -R 777 /app/sessions RUN mkdir -p /app/resources/auth && chmod -R 777 /app/resources RUN mkdir -p /app/tmp && chmod -R 777 /app/tmp RUN mkdir -p /app/pdf && chmod -R 777 /app/pdf ENV PYTHONPATH="${PYTHONPATH}:/app" CMD bash startup