uWSGI安装之后进行简单的test.py测试:

在Mac OS 10.12.6上,安装uWSGI 2.0.18并创建test.py文件进行测试。通过启动uWSGI服务器监听8000端口,然后在浏览器中访问127.0.0.1:8000,成功显示'hello world',标志着uWSGI已成功配置。
Wan2.2-T2V-A5B

Wan2.2-T2V-A5B

文生视频
Wan2.2

Wan2.2是由通义万相开源高效文本到视频生成模型,是有​50亿参数的轻量级视频生成模型,专为快速内容创作优化。支持480P视频生成,具备优秀的时序连贯性和运动推理能力

参考链接 :https://www.cnblogs.com/wswang/p/5521566.html

环境:

OS:Mac10.12.6

Server:uWSGI  2.0.18

1.1 创建一个test.py文件:

# test.py
def application(env, start_response):
    start_response('200 OK', [('Content-Type','text/html')])
    return [b"Hello World"] # python3
    #return ["Hello World"] # python2

1.2 启动uWSGI服务器:

uwsgi --http :8000 --wsgi-file test.py

意思是使用8000端口启动这个文件,效果如下:

(py3_test_venv) shejishi03deiMac:Test shejishi03$ uwsgi --http :8000 --wsgi-file test.py
*** Starting uWSGI 2.0.18 (64bit) on [Wed Jan  1 12:38:48 2020] ***
compiled with version: 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2) on 14 November 2019 08:11:24
os: Darwin-16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64
nodename: shejishi03deiMac.local
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 4
current working directory: /Users/shejishi03/PycharmProjects/Test/Test
detected binary path: /Users/shejishi03/.virtualenvs/py3_test_venv/bin/uwsgi
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 709
your memory page size is 4096 bytes
detected max file descriptor number: 10240
lock engine: OSX spinlocks
thunder lock: disabled (you can enable it with --thunder-lock)
uWSGI http bound on :8000 fd 4
spawned uWSGI http 1 (pid: 3749)
uwsgi socket 0 bound to TCP address 127.0.0.1:58089 (port auto-assigned) fd 3
Python version: 3.7.5 (default, Nov 11 2019, 11:14:37)  [Clang 9.0.0 (clang-900.0.39.2)]
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x7f9b75c0a180
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 72888 bytes (71 KB) for 1 cores
*** Operational MODE: single process ***
WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x7f9b75c0a180 pid: 3748 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (and the only) (pid: 3748, cores: 1)

2.3 访问本机IP及端口 127.0.0.1:8000,

浏览器会显示 hello world

这就说明uWSGI启动成功~可以设置uWSGI启动django了

您可能感兴趣的与本文相关的镜像

Wan2.2-T2V-A5B

Wan2.2-T2V-A5B

文生视频
Wan2.2

Wan2.2是由通义万相开源高效文本到视频生成模型,是有​50亿参数的轻量级视频生成模型,专为快速内容创作优化。支持480P视频生成,具备优秀的时序连贯性和运动推理能力

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值