Nanboy commited on
Commit
7155d6e
·
verified ·
1 Parent(s): 0640a3b

fix: switch to gradio 5.x — HTTP 200 verified locally with real server startup test

Browse files
Files changed (1) hide show
  1. Dockerfile +1 -14
Dockerfile CHANGED
@@ -8,20 +8,7 @@ RUN apt-get update && apt-get install -y \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
  COPY requirements.txt .
11
- RUN pip install --no-cache-dir -r requirements.txt && \
12
- python3 -c "\
13
- import pathlib; \
14
- p = pathlib.Path('/usr/local/lib/python3.11/site-packages/gradio_client/utils.py'); \
15
- src = p.read_text(); \
16
- src = src.replace( \
17
- 'def get_type(schema: dict):\n if \"const\" in schema:', \
18
- 'def get_type(schema: dict):\n if not isinstance(schema, dict): return \"str\"\n if \"const\" in schema:'); \
19
- src = src.replace( \
20
- 'def _json_schema_to_python_type(schema: Any, defs) -> str:\n \"\"\"Convert the json schema into a python type hint\"\"\"\n if schema == {}:', \
21
- 'def _json_schema_to_python_type(schema: Any, defs) -> str:\n \"\"\"Convert the json schema into a python type hint\"\"\"\n if isinstance(schema, bool): return \"Any\"\n if schema == {}:'); \
22
- p.write_text(src); \
23
- print('gradio_client patch applied') \
24
- "
25
 
26
  COPY . .
27
 
 
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
  COPY requirements.txt .
11
+ RUN pip install --no-cache-dir -r requirements.txt
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
  COPY . .
14