api-gg / Dockerfile
tudeplom's picture
Create Dockerfile
3fc7700 verified
raw
history blame contribute delete
447 Bytes
# Sử dụng image Python chính thức
FROM python:3.9-slim
# Đặt thư mục làm việc
WORKDIR /app
# Sao chép các tệp cần thiết
COPY requirements.txt .
COPY app.py .
# Cài đặt phụ thuộc
RUN pip install --no-cache-dir -r requirements.txt
# Mở cổng 7860 (cổng mặc định của Hugging Face Spaces)
EXPOSE 7860
# Chạy ứng dụng với Uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]