Spaces:
Sleeping
Sleeping
change py version
Browse files- Dockerfile +6 -4
- app.py +1 -1
- config.ini +5 -0
Dockerfile
CHANGED
@@ -1,11 +1,13 @@
|
|
1 |
-
FROM python:3.
|
2 |
|
3 |
WORKDIR /code
|
4 |
|
5 |
-
COPY
|
6 |
|
|
|
|
|
|
|
7 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
8 |
|
9 |
-
|
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("
|
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
|