Spaces:
Sleeping
Sleeping
Commit
·
e1f9365
1
Parent(s):
553449b
changes
Browse files- Dockerfile +8 -8
- data_ingetion/vectroDB.py +1 -1
Dockerfile
CHANGED
@@ -4,19 +4,19 @@ FROM python:3.10-slim
|
|
4 |
WORKDIR /app
|
5 |
|
6 |
# Copy the current directory contents into the container at /app
|
7 |
-
COPY . /app
|
8 |
|
9 |
# Install any needed packages specified in requirements.txt
|
10 |
-
RUN pip install -r
|
11 |
|
12 |
# Create a non-root user
|
13 |
RUN useradd -m appuser
|
14 |
|
15 |
# Create necessary directories and set permissions
|
16 |
-
RUN
|
17 |
-
|
18 |
-
|
19 |
|
20 |
-
|
21 |
-
|
22 |
-
CMD ["uvicorn", "
|
|
|
4 |
WORKDIR /app
|
5 |
|
6 |
# Copy the current directory contents into the container at /app
|
7 |
+
COPY requirements.txt /app
|
8 |
|
9 |
# Install any needed packages specified in requirements.txt
|
10 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
11 |
|
12 |
# Create a non-root user
|
13 |
RUN useradd -m appuser
|
14 |
|
15 |
# Create necessary directories and set permissions
|
16 |
+
RUN mkdir -p /app/data && \
|
17 |
+
chown -R appuser:appuser /app && \
|
18 |
+
chmod -R 755 /app
|
19 |
|
20 |
+
COPY . /app
|
21 |
+
|
22 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
data_ingetion/vectroDB.py
CHANGED
@@ -8,7 +8,7 @@ import os
|
|
8 |
VECTOR_NAME = "database"
|
9 |
EMBEDDING_MODEL = "togethercomputer/m2-bert-80M-2k-retrieval"
|
10 |
|
11 |
-
CHROMA_PATH = "
|
12 |
|
13 |
|
14 |
api_key = os.getenv("TOGETHER_API")
|
|
|
8 |
VECTOR_NAME = "database"
|
9 |
EMBEDDING_MODEL = "togethercomputer/m2-bert-80M-2k-retrieval"
|
10 |
|
11 |
+
CHROMA_PATH = "chroma_storage"
|
12 |
|
13 |
|
14 |
api_key = os.getenv("TOGETHER_API")
|