FROM python:3.9-slim WORKDIR /app COPY . . # 先安装依赖确保版本正确 RUN pip install --no-cache-dir -r requirements.txt \ && pip install "sentence-transformers" \ && pip install "torch" --extra-index-url https://download.pytorch.org/whl/cpu EXPOSE 5000 CMD ["python", "app.py"]