dragonxd1 commited on
Commit
fdbd75e
·
verified ·
1 Parent(s): f36ab8c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -7
Dockerfile CHANGED
@@ -1,19 +1,29 @@
1
  FROM python:3.10-slim
2
 
3
- # install git + bash
4
- RUN apt-get update && apt-get install -y git bash && rm -rf /var/lib/apt/lists/*
 
5
 
6
- # working directory
 
 
 
 
 
 
 
 
 
7
  WORKDIR /app
8
 
9
- # copy launcher
10
  COPY app.py .
11
 
12
- # install base deps
13
  RUN pip install --no-cache-dir fastapi uvicorn
14
 
15
- # HF spaces port
16
  EXPOSE 7860
17
 
18
- # run launcher
19
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.10-slim
2
 
3
+ # Set Cloudflare DNS
4
+ RUN echo "nameserver 1.1.1.1" > /etc/resolv.conf && \
5
+ echo "nameserver 1.0.0.1" >> /etc/resolv.conf
6
 
7
+ # Install system dependencies
8
+ RUN apt-get update && apt-get install -y \
9
+ git \
10
+ bash \
11
+ dnsutils \
12
+ curl \
13
+ ffmpeg \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
16
+ # Working directory
17
  WORKDIR /app
18
 
19
+ # Copy launcher
20
  COPY app.py .
21
 
22
+ # Install Python dependencies
23
  RUN pip install --no-cache-dir fastapi uvicorn
24
 
25
+ # HuggingFace Spaces port
26
  EXPOSE 7860
27
 
28
+ # Start server
29
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]