File size: 452 Bytes
bf9283b
 
 
 
 
cf1b6d1
 
 
 
 
 
 
f9f13ce
fcbd917
 
 
 
bf9283b
ed7cc88
bf9283b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import os
from dotenv import load_dotenv
from subprocess import Popen
load_dotenv()

command = ["pip", "uninstall", "ipykernel"] 
worker = Popen(command) 
worker.wait()

command = ["pip", "install", "ipykernel"] 
worker = Popen(command) 
worker.wait()

command = ["pip", "install", "numexpr==2.7.3"] 
worker = Popen(command) 
worker.wait()

command = ["mercury", "run", f"0.0.0.0:{os.environ.get('PORT', 7860)}"] 
worker = Popen(command) 
worker.wait()