JunhanCai commited on
Commit
4bebe28
·
1 Parent(s): 19f89a0

Fix directory structure

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -1
  2. app.py → webserver/app.py +1 -1
Dockerfile CHANGED
@@ -15,4 +15,4 @@ ENV PATH="/home/user/.local/bin:$PATH"
15
  COPY --chown=user . /webserver
16
 
17
  # 7. 启动:按下“开机键”
18
- CMD ["uvicorn", "webserver:app", "--host", "0.0.0.0", "--port", "7860"]
 
15
  COPY --chown=user . /webserver
16
 
17
  # 7. 启动:按下“开机键”
18
+ CMD ["uvicorn", "webserver.app:app", "--host", "0.0.0.0", "--port", "7860"]
app.py → webserver/app.py RENAMED
@@ -26,7 +26,7 @@ BASE_DIR = os.path.dirname(__file__)
26
  UPLOAD_DIR = os.path.join(BASE_DIR, "uploads")
27
  RUNS_DIR = os.path.join(BASE_DIR, "runs")
28
  PREDICTIONS_DIR = os.path.join(BASE_DIR, "predictions")
29
- TEMPLATE_DIR = os.path.join(BASE_DIR, "webserver/templates")
30
 
31
  os.makedirs(UPLOAD_DIR, exist_ok=True)
32
  os.makedirs(RUNS_DIR, exist_ok=True)
 
26
  UPLOAD_DIR = os.path.join(BASE_DIR, "uploads")
27
  RUNS_DIR = os.path.join(BASE_DIR, "runs")
28
  PREDICTIONS_DIR = os.path.join(BASE_DIR, "predictions")
29
+ TEMPLATE_DIR = os.path.join(BASE_DIR, "templates")
30
 
31
  os.makedirs(UPLOAD_DIR, exist_ok=True)
32
  os.makedirs(RUNS_DIR, exist_ok=True)