FROM python:3.10-slim # Install system dependencies RUN apt-get update && apt-get install -y \ git \ bash \ dnsutils \ curl \ ffmpeg \ libffi-dev \ libnacl-dev \ && rm -rf /var/lib/apt/lists/* # Set working directory WORKDIR /app # Copy files COPY app.py . # Install Python dependencies RUN pip install --no-cache-dir \ fastapi \ uvicorn \ httpx \ pyrogram \ tgcrypto # Expose port (HuggingFace Spaces) EXPOSE 7860 # Start app (no sudo needed) CMD sh -c 'echo "nameserver 1.1.1.1" > /etc/resolv.conf && \ echo "nameserver 1.0.0.1" >> /etc/resolv.conf && \ uvicorn app:app --host 0.0.0.0 --port 7860'