FROM python:3.11-slim # 安裝依賴 COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # 安裝相容的 huggingface_hub 版本 RUN pip install --no-cache-dir "huggingface_hub<0.24.0" # 複製應用 COPY . /app WORKDIR /app # 啟動應用 CMD ["python", "app.py"]