FROM python:3.11-slim WORKDIR /app # Cài dependency COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy source COPY . . RUN apt-get update && apt-get install -y unzip \ && if [ -f images/IMAGE_CROP.zip ]; then \ unzip images/IMAGE_CROP.zip -d images && rm images/IMAGE_CROP.zip; \ fi \ && if [ -f images/UPLOAD_CROP-17_12.zip ]; then \ unzip images/UPLOAD_CROP-17_12.zip -d images && rm images/UPLOAD_CROP-17_12.zip; \ fi \ && apt-get remove -y unzip \ && apt-get autoremove -y \ && rm -rf /var/lib/apt/lists/* # Expose port EXPOSE 7860 # Run server CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]