FROM python:3.10-slim # 1) Install dependencies for Dev Mode + Playwright RUN apt-get update && \ apt-get install -y \ bash \ curl \ wget \ procps \ git \ git-lfs \ libnss3 \ libatk1.0-0 \ libatk-bridge2.0-0 \ libx11-6 \ libx11-xcb1 \ libxcomposite1 \ libxcursor1 \ libxdamage1 \ libxext6 \ libxfixes3 \ libxi6 \ libxrandr2 \ libxrender1 \ libxss1 \ libxtst6 \ libappindicator1 \ libsecret-1-0 \ fonts-ipafont-gothic && \ rm -rf /var/lib/apt/lists/* # 2) Copy code into /app WORKDIR /app COPY . /app ENV HOME=/app # 3) Install Python dependencies RUN pip install --upgrade pip RUN pip install gradio==5.27.1 RUN pip install -U crawl4ai==0.6.3 # 4) Install Playwright browser(s) RUN pip install playwright==1.53.0 RUN python -m playwright install --with-deps chromium RUN pip install appbuilder_sdk==1.0.6 \ docx==0.2.4 \ faiss-cpu==1.9.0 \ jieba==0.42.1 \ mcp==1.9.4 \ numpy==2.2.6 \ openai==1.88.0 \ pdfplumber==0.11.7 \ python_docx==1.1.2 \ Requests==2.32.4 \ sse-starlette==2.3.6 # 5) Make /app owned by user 1000 (Dev Mode requirement) RUN chown -R 1000 /app # 6) Switch to user 1000 USER 1000 # 7) Expose port for Gradio EXPOSE 7860 # 8) Start your Gradio app CMD ["python", "app.py"]