Peter Larnholt commited on
Commit
aaa0398
·
1 Parent(s): 877eb8c

Pass VLLM_USE_OUTLINES=0 to subprocess and remove outlines dependencies

Browse files
Files changed (2) hide show
  1. app.py +3 -1
  2. requirements.txt +5 -5
app.py CHANGED
@@ -34,7 +34,9 @@ if "AWQ" in MODEL_ID.upper():
34
 
35
  def launch_vllm():
36
  print(f"[vLLM] Launch: {MODEL_ID}")
37
- subprocess.Popen(VLLM_ARGS)
 
 
38
 
39
  def wait_vllm_ready(timeout=900, interval=3):
40
  url = f"http://127.0.0.1:{API_PORT}/v1/models"
 
34
 
35
  def launch_vllm():
36
  print(f"[vLLM] Launch: {MODEL_ID}")
37
+ env = os.environ.copy()
38
+ env["VLLM_USE_OUTLINES"] = "0" # disable outlines to avoid pyairports import
39
+ subprocess.Popen(VLLM_ARGS, env=env)
40
 
41
  def wait_vllm_ready(timeout=900, interval=3):
42
  url = f"http://127.0.0.1:{API_PORT}/v1/models"
requirements.txt CHANGED
@@ -10,8 +10,8 @@ torch==2.4.0
10
  transformers>=4.44
11
  accelerate>=0.30
12
 
13
- # Structured outputs stack used by vLLM
14
- outlines[types]==0.0.46
15
- numba==0.59.1
16
- pycountry==24.6.1
17
- pyairports==0.0.1
 
10
  transformers>=4.44
11
  accelerate>=0.30
12
 
13
+ # Structured outputs stack used by vLLM (disabled via VLLM_USE_OUTLINES=0)
14
+ # outlines[types]==0.0.46
15
+ # numba==0.59.1
16
+ # pycountry==24.6.1
17
+ # pyairports==0.0.1