HycJack commited on
Commit
74b6126
·
1 Parent(s): 593a1d9

modify dockerfile

Browse files
Files changed (2) hide show
  1. Dockerfile +3 -0
  2. main.py +1 -1
Dockerfile CHANGED
@@ -5,6 +5,9 @@ WORKDIR /code
5
  COPY ./requirements.txt /code/requirements.txt
6
 
7
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
 
 
 
8
  RUN mkdir /usr/local/lib/python3.10/site-packages/rapid_table/models
9
  RUN chmod -R 777 /usr/local/lib/python3.10/site-packages/rapid_table/models
10
  RUN pip uninstall opencv-python -y
 
5
  COPY ./requirements.txt /code/requirements.txt
6
 
7
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
+ RUN chmod -R 777 /code
9
+ RUN mkdir /code/tmp_uploads
10
+ RUN chmod -R 777 /code/tmp_uploads
11
  RUN mkdir /usr/local/lib/python3.10/site-packages/rapid_table/models
12
  RUN chmod -R 777 /usr/local/lib/python3.10/site-packages/rapid_table/models
13
  RUN pip uninstall opencv-python -y
main.py CHANGED
@@ -49,7 +49,7 @@ async def ocr(file: UploadFile = File(...)):
49
  return out_df.to_dict(orient='records')
50
 
51
  TMP_DIR = Path(__file__).parent / "tmp_uploads"
52
- TMP_DIR.mkdir(parents=True, exist_ok=True)
53
  @app.post("/ocr_table")
54
  async def ocr_table(file: UploadFile = File(...)):
55
  # ------------------- ① 参数校验 -------------------
 
49
  return out_df.to_dict(orient='records')
50
 
51
  TMP_DIR = Path(__file__).parent / "tmp_uploads"
52
+ # TMP_DIR.mkdir(parents=True, exist_ok=True)
53
  @app.post("/ocr_table")
54
  async def ocr_table(file: UploadFile = File(...)):
55
  # ------------------- ① 参数校验 -------------------