File size: 657 Bytes
fb49fe2
f36ab8c
fdbd75e
 
 
 
 
 
 
9cb019c
 
fdbd75e
 
af3fb06
f36ab8c
 
af3fb06
f36ab8c
 
fdbd75e
af3fb06
 
 
 
 
 
f36ab8c
af3fb06
f36ab8c
 
af3fb06
 
 
83220cd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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'