CoolFace
Apppublic

thienphuc12339/SignLanguage

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
Dockerfile28 linesDownload Raw Back to root
1FROM python:3.10-slim2 3# Tắt buffering để log ra terminal ngay lập tức4ENV PYTHONUNBUFFERED=15 6# Cài đặt các thư viện hệ thống cần thiết7RUN apt-get update && apt-get install -y \8    libgl1-mesa-glx \9    libglib2.0-0 \10    && rm -rf /var/lib/apt/lists/*11 12WORKDIR /app13 14# Sao chép requirements.txt vào container và cài đặt15COPY requirements.txt .16RUN pip install --no-cache-dir -r requirements.txt17 18# Sao chép toàn bộ code vào container19COPY . .20 21# Thiết lập biến môi trường PORT (Hugging Face sẽ trỏ traffic vào port này)22ENV PORT 786023EXPOSE 786024 25# Chạy ứng dụng FastAPI bằng uvicorn26# Ở đây giả sử file main app của bạn là app.py và app là tên biến FastAPI instance27CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]28