美文网首页
wsgi.ini无权限问题

wsgi.ini无权限问题

作者: 一个摸鱼AI喵 | 来源:发表于2021-10-12 09:40 被阅读0次

    报错信息

    chdir() to /root/python_project/django_face
    chdir(): Permission denied [core/uwsgi.c line 2625]
    chdir(): Permission denied [core/uwsgi.c line 1649]
    

    原因:容器的root无权限进入

    解决方法:

    1.创建容器挂载目录修改不要放在root下,比如放在tmp下

    docker run --name mms_insightface_gpu_yj \
    --hostname mms_insightface_gpu_yj \
    -tid \
    --restart=on-failure:10 \
    -p 8602:8600 \
    -v /root/python_project/YJ/django_insightface:/tmp/python_project/django_face \
    mms_insightface \
    uwsgi /tmp/python_project/django_face/wsgi.ini
    

    2.wsgi.ini文件修改

    [uwsgi]
    http-socket = :8600
    chdir = /tmp/python_project/django_face  # 此处修改为tmp
    reload-mercy=8
    master = True
    reload-on-as = 16000
    buffer-size = 65535
    wsgi-file = django_insightface/wsgi.py
    processes = 2
    threads = 4
    listen = 100
    vacuum = true
    lazy-apps=true
    

    相关文章

      网友评论

          本文标题:wsgi.ini无权限问题

          本文链接:https://www.haomeiwen.com/subject/pclonltx.html