rbiswasfc commited on
Commit
8fb3197
1 Parent(s): 00ebeef

change py version

Browse files
Files changed (3) hide show
  1. Dockerfile +6 -4
  2. app.py +1 -1
  3. config.ini +5 -0
Dockerfile CHANGED
@@ -1,11 +1,13 @@
1
- FROM python:3.9
2
 
3
  WORKDIR /code
4
 
5
- COPY ./requirements.txt /code/requirements.txt
6
 
 
 
 
7
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
 
9
- COPY ./app.py /code/
10
-
11
  CMD ["python", "app.py"]
 
1
+ FROM python:3.10
2
 
3
  WORKDIR /code
4
 
5
+ COPY --link --chown=1000 . .
6
 
7
+ RUN mkdir -p /tmp/cache/
8
+ RUN chmod a+rwx -R /tmp/cache/
9
+ ENV HF_HUB_CACHE=HF_HOME
10
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
11
 
12
+ ENV PYTHONUNBUFFERED=1 PORT=7860
 
13
  CMD ["python", "app.py"]
app.py CHANGED
@@ -176,7 +176,7 @@ style = Style(
176
  app, rt = fast_app(live=True, hdrs=(style,))
177
 
178
  # Initialize a database to store search logs --
179
- db = database("data/search_logs.db")
180
  search_logs = db.t.search_logs
181
  if search_logs not in db.t:
182
  search_logs.create(
 
176
  app, rt = fast_app(live=True, hdrs=(style,))
177
 
178
  # Initialize a database to store search logs --
179
+ db = database("log_data/search_logs.db")
180
  search_logs = db.t.search_logs
181
  if search_logs not in db.t:
182
  search_logs.create(
config.ini ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ [DEFAULT]
2
+ dataset_id = zotero-logs
3
+ db_dir = log_data
4
+ private_backup = True
5
+ interval = 10 # number of minutes between periodic backups