ashishbangwal commited on
Commit
e1f9365
·
1 Parent(s): 553449b
Files changed (2) hide show
  1. Dockerfile +8 -8
  2. 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 requirement.txt
11
 
12
  # Create a non-root user
13
  RUN useradd -m appuser
14
 
15
  # Create necessary directories and set permissions
16
- RUN chown -R appuser:appuser /app && \
17
- chmod -R 755 /app && \
18
- mkdir -p /app/chroma_storage
19
 
20
- USER appuser
21
- # Start the FastAPI app on port 7860, the default port expected by Spaces
22
- CMD ["uvicorn", "main_api:app", "--host", "0.0.0.0", "--port", "7860"]
 
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 = "./chroma_storage"
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")