final_sentiment / Dockerfile
tunglee7it's picture
Upload 11 files
6581568 verified
raw
history blame contribute delete
516 Bytes
FROM python:3.10-slim
# Set working directory
WORKDIR /app
# Cài dependency hệ thống cần thiết
RUN apt-get update && apt-get install -y \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements trước để cache
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy toàn bộ source
COPY . .
# Hugging Face yêu cầu app chạy ở port 7860
EXPOSE 7860
# Chạy FastAPI
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]