MoneyPrinterTurbo icon indicating copy to clipboard operation
MoneyPrinterTurbo copied to clipboard

Huggingface部署时提示目录MoneyPrinterTurbo没有权限

Open SokWith opened this issue 9 months ago • 4 comments

采用Dockerfile在Huggingface上部署出现错误,需要追加写入权限; 附:修改后的Dockerfile,适合在Huggingface上直接部署:

# 使用官方的Python运行时作为父镜像
FROM python:3.10-slim-bullseye

# 在容器中设置工作目录
WORKDIR /MoneyPrinterTurbo

# 设置/MoneyPrinterTurbo目录权限为777
RUN chmod 777 /MoneyPrinterTurbo

ENV PYTHONPATH="/MoneyPrinterTurbo"

# 安装git和其他系统依赖
RUN apt-get update && apt-get install -y \
    git \
    imagemagick \
    ffmpeg \
    && rm -rf /var/lib/apt/lists/*

# 修复ImageMagick的安全策略
RUN sed -i '/<policy domain="path" rights="none" pattern="@\*"/d' /etc/ImageMagick-6/policy.xml

# 克隆GitHub仓库
RUN git clone https://github.com/harry0703/MoneyPrinterTurbo .

# 安装Python依赖
RUN pip install --no-cache-dir -r requirements.txt

# 暴露应用运行的端口
EXPOSE 7860

# 运行应用程序的命令
CMD ["streamlit", "run", "./webui/Main.py","--server.address=0.0.0.0","--server.port=7860","--server.enableCORS=True","--browser.gatherUsageStats=False"]

SokWith avatar Apr 23 '24 14:04 SokWith

希望追加功能,能够查看历史task输出的文件。 采用Huggingface一键部署的,task输出文件在远程服务器上,不能回看。

SokWith avatar Apr 23 '24 14:04 SokWith

https://huggingface.co/spaces/jokyo3/MovPrinter?logs=container&duplicate=true&visibility=public

Huggingface一键部署

SokWith avatar Apr 24 '24 14:04 SokWith

这个填写OPENAI的API KEY,是不是所有人都能看到了?

harry0703 avatar Apr 25 '24 09:04 harry0703

这个填写OPENAI的API KEY,是不是所有人都能看到了?

是的。因为原本就是读取配置回显的,所以任何人更改配置被写入配置文件后后面的就都读取配置回显了。 简单的处理还是关闭显示

SokWith avatar Apr 25 '24 11:04 SokWith

加了个配置项 :)

[app]
  hide_config = false

harry0703 avatar Apr 26 '24 06:04 harry0703