Spaces:
Paused
Paused
| FROM python:3.11-slim | |
| # 安装依赖和 supercronic | |
| RUN apt-get update && apt-get install -y curl gcc libpq-dev build-essential --no-install-recommends \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # 安装 supercronic | |
| RUN curl -fsSL -o /usr/local/bin/supercronic "https://github.com/aptible/supercronic/releases/download/v0.2.29/supercronic-linux-amd64" \ | |
| && chmod +x /usr/local/bin/supercronic | |
| WORKDIR /workspace | |
| COPY . /workspace | |
| RUN pip install --upgrade pip | |
| RUN pip install -r requirements.txt | |
| # --- 修改部分开始 --- | |
| # 创建目录后,立即为 /data 文件夹及其所有子文件夹赋予所有用户读、写、执行的权限 | |
| RUN mkdir -p /data/uploads /data/outputs /workspace/logs | |
| RUN chmod -R 777 /data | |
| # --- 修改部分结束 --- | |
| RUN chmod +x /workspace/start.sh | |
| EXPOSE 7860 | |
| CMD ["/workspace/start.sh"] |