run.py 295 Bytes
Newer Older
chenpangpang's avatar
chenpangpang committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import os
from multiprocessing import Pool

cmd_list = ["ollama serve",
            "/opt/conda/envs/open-webui-env/bin/open-webui serve"]


def run(cmd):
    os.system(cmd)


if __name__ == "__main__":
    pool = Pool(len(cmd_list))
    pool.map(run, cmd_list)
    pool.close()
    pool.join()