使用DSW部署glm3-6b,gradio访问403?

镜像:dsw-registry-vpc.cn-shanghai.cr.aliyuncs.com/pai/modelscope:1.10.0-pytorch2.1.0tensorflow2.14.0-gpu-py310-cu118-ubuntu22.04
源码:https://github.com/THUDM/ChatGLM3
image.png
image.png

展开
收起
游客klnzerennefxe 2024-01-18 11:54:03 744 分享 版权
3 条回答
写回答
取消 提交回答
  • gradio版本不匹配,把gradio的版本降一下就可以了。
    如gradio==3.39

    2024-02-02 12:13:43
    赞同 1 展开评论
  • 我也遇到了同样的问题,版本如下
    gradio==4.14.0
    gradio_client==0.8.0

    查看错误日志发现其实这个版本的gradio已经提供了解决方案,但是由于在DSW里无法访问gradio的服务器导致一个程序安装失败,share的url没有生成成功,需要手动安装gradio提供的frpc,可以看一下错提示

    我这里报错是这样
    Could not create share link. Missing file: /opt/conda/lib/python3.10/site-packages/gradio/frpc_linux_amd64_v0.2.

    Please check your internet connection. This can happen if your antivirus software blocks the download of this file. You can install manually by following these steps:

    1. Download this file: https://cdn-media.huggingface.co/frpc-gradio-0.2/frpc_linux_amd64
    2. Rename the downloaded file to: frpc_linux_amd64_v0.2
    3. Move the file to this location: /opt/conda/lib/python3.10/site-packages/gradio
    2024-02-01 13:55:19
    赞同 展开评论
  • 面对过去,不要迷离;面对未来,不必彷徨;活在今天,你只要把自己完全展示给别人看。

    这个问题可能是由于Gradio部署时没有正确配置访问权限导致的。你可以尝试以下方法解决这个问题:

    1. 确保你的模型已经成功部署到DSW上,并且可以通过URL访问。例如:http://your_dsw_server/your_model_name

    2. 在Gradio部署时,确保你已经设置了正确的访问权限。你可以使用gradio.launch()函数的share参数来控制访问权限。例如:

    import gradio as gr
    
    def your_function(input):
        # Your model inference code here
        pass
    
    iface = gr.Interface(fn=your_function, inputs="text", outputs="text")
    iface.launch(share=True)  # 设置访问权限为公开
    
    1. 如果问题仍然存在,你可以尝试在DSW服务器上检查防火墙设置,确保端口没有被阻止。同时,确保你的模型可以被外部访问。
    2024-01-19 14:36:33
    赞同 展开评论

ModelScope旨在打造下一代开源的模型即服务共享平台,为泛AI开发者提供灵活、易用、低成本的一站式模型服务产品,让模型应用更简单!欢迎加入技术交流群:微信公众号:魔搭ModelScope社区,钉钉群号:44837352

还有其他疑问?
咨询AI助理