FROM python:3.9-slim WORKDIR /cloudgallery # 安装依赖 RUN pip install --no-cache-dir flask flask-cors huggingface_hub gunicorn requests # 复制所有文件 COPY . . # 创建缓存目录 RUN mkdir -p /cloudgallery/cache && chmod 777 /cloudgallery/cache # 启动 CMD ["python", "cf.py"]