vomebook commited on
Commit
03bf6c9
·
verified ·
1 Parent(s): 48c735b

Upload 2 files

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -1
  2. start.sh +3 -1
Dockerfile CHANGED
@@ -6,7 +6,7 @@ COPY requirements.txt .
6
 
7
  RUN pip install --no-cache-dir -r requirements.txt
8
 
9
- COPY app.py build_fulltext_db.py start.sh ./
10
 
11
  COPY static/ static/
12
 
 
6
 
7
  RUN pip install --no-cache-dir -r requirements.txt
8
 
9
+ COPY app.py build_fulltext_db.py prepare_fulltext_index.py start.sh ./
10
 
11
  COPY static/ static/
12
 
start.sh CHANGED
@@ -2,6 +2,8 @@
2
  set -eu
3
 
4
  mkdir -p /app/data/fulltext
5
- python /app/build_fulltext_db.py &
 
 
6
 
7
  exec uvicorn app:app --host 0.0.0.0 --port 7860 --log-level info
 
2
  set -eu
3
 
4
  mkdir -p /app/data/fulltext
5
+ if ! python /app/prepare_fulltext_index.py; then
6
+ python /app/build_fulltext_db.py &
7
+ fi
8
 
9
  exec uvicorn app:app --host 0.0.0.0 --port 7860 --log-level info