Download Dockerfile from TradaAI/Chatopus: direct link, hf CLI and curl.
- Browser
- Download file 850 Bytes
-
https://huggingface.co/spaces/TradaAI/Chatopus/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/TradaAI/Chatopus/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/TradaAI/Chatopus/resolve/main/Dockerfile
850 Bytes
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # 1. Cài requirements Python | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 2. Cài các công cụ kiểm tra mạng | |
| RUN apt-get update && apt-get install -y curl dnsutils iputils-ping | |
| # 3. Tạo script kiểm tra mạng | |
| RUN echo '#!/bin/bash\n\ | |
| echo "=== ✅ DNS TEST ==="\n\ | |
| nslookup graph.facebook.com || echo "❌ DNS failed"\n\ | |
| echo "\n=== ✅ PING TEST ==="\n\ | |
| ping -c 2 8.8.8.8 || echo "❌ Ping failed"\n\ | |
| echo "\n=== ✅ CURL TEST ==="\n\ | |
| curl -I https://graph.facebook.com || echo "❌ Curl failed"\n\ | |
| echo "\n=== 🚀 Launching your app ==="\n\ | |
| exec uvicorn app.main:app --host 0.0.0.0 --port 7860\n' > /app/start.sh && chmod +x /app/start.sh | |
| # 4. Copy toàn bộ project vào /app | |
| COPY . . | |
| # 5. Chạy script test + khởi động app | |
| CMD ["bash", "/app/start.sh"] | |