upload
Browse files- Dockerfile +2 -0
- base_class.py +2 -2
Dockerfile
CHANGED
@@ -6,8 +6,10 @@ WORKDIR /app
|
|
6 |
|
7 |
# make directory /app/files/
|
8 |
RUN mkdir /app/files/
|
|
|
9 |
# grant permission to write to /app/files/
|
10 |
RUN chmod 777 /app/files/
|
|
|
11 |
|
12 |
# Copy the requirements file into the container
|
13 |
COPY requirements.txt .
|
|
|
6 |
|
7 |
# make directory /app/files/
|
8 |
RUN mkdir /app/files/
|
9 |
+
RUN mkdir /app/ckpt/
|
10 |
# grant permission to write to /app/files/
|
11 |
RUN chmod 777 /app/files/
|
12 |
+
RUN chmod 777 /app/ckpt/
|
13 |
|
14 |
# Copy the requirements file into the container
|
15 |
COPY requirements.txt .
|
base_class.py
CHANGED
@@ -19,7 +19,7 @@ class Embedding_Model(metaclass=abc.ABCMeta):
|
|
19 |
|
20 |
def __init__(self, model_name) -> None:
|
21 |
"""Initialize the embedding model"""
|
22 |
-
embedding_cache_path = f"/
|
23 |
self.embedding_cache_path = embedding_cache_path
|
24 |
|
25 |
# load the cache if it exists, and save a copy to disk
|
@@ -43,7 +43,7 @@ class AbstractPDFParser(metaclass=abc.ABCMeta):
|
|
43 |
|
44 |
def __init__(self, db_name) -> None:
|
45 |
"""Initialize the pdf database"""
|
46 |
-
db_cache_path = f"/
|
47 |
self.db_cache_path = db_cache_path
|
48 |
|
49 |
# load the cache if it exists, and save a copy to disk
|
|
|
19 |
|
20 |
def __init__(self, model_name) -> None:
|
21 |
"""Initialize the embedding model"""
|
22 |
+
embedding_cache_path = f"/app/ckpt/embedding_cache_{model_name}.pkl"
|
23 |
self.embedding_cache_path = embedding_cache_path
|
24 |
|
25 |
# load the cache if it exists, and save a copy to disk
|
|
|
43 |
|
44 |
def __init__(self, db_name) -> None:
|
45 |
"""Initialize the pdf database"""
|
46 |
+
db_cache_path = f"/app/ckpt/pdf_parser_{db_name}.pkl"
|
47 |
self.db_cache_path = db_cache_path
|
48 |
|
49 |
# load the cache if it exists, and save a copy to disk
|