FROM python:3.9-slim RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y COPY requirements.txt . RUN pip3 install --no-cache-dir -r requirements.txt RUN pip3 list # Set up a new user named "user" with user ID 1000 RUN useradd -m -u 1000 user # 切换到"user"用户 USER user WORKDIR /app COPY . /app EXPOSE 7860 ENTRYPOINT ["python3","app.py"]