12.5 特权权限更改

This commit is contained in:
zy123 2024-12-05 10:15:53 +08:00
parent 830c9b0f83
commit bcebda14c0
2 changed files with 2 additions and 3 deletions

View File

@ -7,8 +7,6 @@ services:
- "5000:5000" # 将容器的5000端口映射到主机的5000端口
env_file:
- .env # 使用 .env 文件中的环境变量
environment:
- OPENBLAS_NUM_THREADS=1 # 限制 OpenBLAS 线程数
volumes:
# - .:/flask_project # 将当前目录挂载到容器的 /flask_project 目录(可选,便于开发时实时更新代码)
- /home/Z/zbparse_output_dev:/flask_project/flask_app/static/output # 额外的数据卷挂载
@ -16,6 +14,7 @@ services:
mem_limit: "8g" # 容器最大可使用内存为8GB
mem_reservation: "4g" # 容器保证可使用内存为4GB
cpus: 2.0 # 限制容器使用2个CPU核心
privileged: true
# 可选:定义网络或其他全局配置
# networks:
# default:

View File

@ -3,4 +3,4 @@ from waitress import serve
from flask_app.start_up import create_app
if __name__ == "__main__":
app=create_app()
serve(app, host='0.0.0.0', port=5000,threads=100)
serve(app, host='0.0.0.0', port=5000)