ShannonAI / service-streamer

Boosting your Web Services of Deep Learning Applications.
Apache License 2.0
1.22k stars 187 forks source link

多gpu设置时只设置cuda_devices=(2,3)不起作用,仍然使用0,1,2,3四块卡 #53

Closed YiLing28 closed 4 years ago

YiLing28 commented 4 years ago

streamer = Streamer(ManagedBertModel, batch_size=64, max_latency=0.1, worker_num=4, cuda_devices=(2, 3))

image 基本上是按照flask_multigpu_example.py文件来写的。

yangtianyu92 commented 4 years ago

export CUDA_VISIBLE_DEVICES=2,3 你试试,应该能解决你的问题。我就是这么做的。