dragonxd1 commited on
Commit
af3fb06
·
verified ·
1 Parent(s): 9deceea

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -7
Dockerfile CHANGED
@@ -11,19 +11,25 @@ RUN apt-get update && apt-get install -y \
11
  libnacl-dev \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
- # Working directory
15
  WORKDIR /app
16
 
17
- # Copy launcher
18
  COPY app.py .
19
 
20
  # Install Python dependencies
21
- RUN pip install --no-cache-dir fastapi uvicorn httpx pytgcalls
 
 
 
 
 
 
22
 
23
- # HuggingFace Spaces port
24
  EXPOSE 7860
25
 
26
- # Startup: try to change DNS then start server
27
- CMD sh -c 'echo "nameserver 1.1.1.1" | sudo tee /etc/resolv.conf >/dev/null 2>&1; \
28
- echo "nameserver 1.0.0.1" | sudo tee -a /etc/resolv.conf >/dev/null 2>&1; \
29
  uvicorn app:app --host 0.0.0.0 --port 7860'
 
11
  libnacl-dev \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
+ # Set working directory
15
  WORKDIR /app
16
 
17
+ # Copy files
18
  COPY app.py .
19
 
20
  # Install Python dependencies
21
+ RUN pip install --no-cache-dir \
22
+ fastapi \
23
+ uvicorn \
24
+ httpx \
25
+ pytgcalls \
26
+ pyrogram \
27
+ tgcrypto
28
 
29
+ # Expose port (HuggingFace Spaces)
30
  EXPOSE 7860
31
 
32
+ # Start app (no sudo needed)
33
+ CMD sh -c 'echo "nameserver 1.1.1.1" > /etc/resolv.conf && \
34
+ echo "nameserver 1.0.0.1" >> /etc/resolv.conf && \
35
  uvicorn app:app --host 0.0.0.0 --port 7860'