we start from . now
Browse files- Dockerfile +3 -3
- app/main_reflex.py +4 -4
Dockerfile
CHANGED
@@ -8,8 +8,8 @@ ENV PYTHONUNBUFFERED 1
|
|
8 |
ENV ENVIRONMENT=dev
|
9 |
|
10 |
COPY ./app /app
|
11 |
-
WORKDIR
|
12 |
-
RUN mkdir /data
|
13 |
|
14 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
15 |
# ^ no caching of the packages to save space
|
@@ -24,4 +24,4 @@ ENV TRANSFORMERS_CACHE=/usr/local/lib/python3.10/site-packages/llama_index/legac
|
|
24 |
# ^ not elegant but it works
|
25 |
# HF warning says that TRANSFORMERS_CACHE will be deprecated in transformers v5, and advise to use HF_HOME
|
26 |
|
27 |
-
CMD ["uvicorn", "main_reflex:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
8 |
ENV ENVIRONMENT=dev
|
9 |
|
10 |
COPY ./app /app
|
11 |
+
WORKDIR .
|
12 |
+
RUN mkdir /app/data
|
13 |
|
14 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
15 |
# ^ no caching of the packages to save space
|
|
|
24 |
# ^ not elegant but it works
|
25 |
# HF warning says that TRANSFORMERS_CACHE will be deprecated in transformers v5, and advise to use HF_HOME
|
26 |
|
27 |
+
CMD ["uvicorn", "app.main_reflex:app", "--host", "0.0.0.0", "--port", "7860"]
|
app/main_reflex.py
CHANGED
@@ -16,7 +16,7 @@ try:
|
|
16 |
except Exception as e:
|
17 |
pass
|
18 |
|
19 |
-
from engine.processing import ( # << creates the collection already
|
20 |
process_pdf,
|
21 |
process_txt,
|
22 |
index_data,
|
@@ -24,11 +24,11 @@ from engine.processing import ( # << creates the collection already
|
|
24 |
vector_search,
|
25 |
vector_search_raw
|
26 |
)
|
27 |
-
from .rag.rag import rag_it
|
28 |
|
29 |
-
from .engine.logger import logger
|
30 |
|
31 |
-
from .settings import datadir, datadir2
|
32 |
|
33 |
if not os.path.exists(datadir):
|
34 |
os.makedirs(datadir, exist_ok=True)
|
|
|
16 |
except Exception as e:
|
17 |
pass
|
18 |
|
19 |
+
from app.engine.processing import ( # << creates the collection already
|
20 |
process_pdf,
|
21 |
process_txt,
|
22 |
index_data,
|
|
|
24 |
vector_search,
|
25 |
vector_search_raw
|
26 |
)
|
27 |
+
from app.rag.rag import rag_it
|
28 |
|
29 |
+
from app.engine.logger import logger
|
30 |
|
31 |
+
from app.settings import datadir, datadir2
|
32 |
|
33 |
if not os.path.exists(datadir):
|
34 |
os.makedirs(datadir, exist_ok=True)
|