# 使用Hugging Face提供的基础镜像 FROM python:3.10 WORKDIR /code RUN chmod 777 /code COPY ./requirements.txt /code/requirements.txt #COPY ./ /code/. ENV FONTCONFIG_PATH /tmp ENV MPLCONFIGDIR /tmp RUN mkdir -p /tmp/matplotlib_config /tmp/fontconfig && \ chmod -R 777 /tmp/matplotlib_config /tmp/fontconfig # RUN apt-get update && apt-get install -y git git-lfs ffmpeg libsm6 libxext6 cmake libgl1-mesa-glx && rm -rf /var/lib/apt/lists/* && git lfs install RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt COPY . . CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]