FROM python:3.11-slim # Install Node.js, npm, and ffmpeg (fixes the pydub warning) RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm ffmpeg \ && rm -rf /var/lib/apt/lists/* # Pre-install localtunnel globally (npx will use it without downloading each time) RUN npm install -g localtunnel RUN pip install --no-cache-dir g4f[all] EXPOSE 7860 COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh CMD ["/entrypoint.sh"]