Kushagra commited on
Commit
ca27706
·
1 Parent(s): b64d6a4

Fixing Directory

Browse files
Files changed (4) hide show
  1. .gitignore +2 -3
  2. Dockerfile +4 -5
  3. cache/Readme.md +1 -0
  4. database/faiss_index/Readme.md +1 -0
.gitignore CHANGED
@@ -2,12 +2,11 @@
2
  __pycache__/
3
  *.py[codz]
4
  *$py.class
5
- cache/
6
- database/
7
  # C extensions
8
  *.so
9
  .idea/
10
-
 
11
  # Distribution / packaging
12
  .Python
13
  build/
 
2
  __pycache__/
3
  *.py[codz]
4
  *$py.class
 
 
5
  # C extensions
6
  *.so
7
  .idea/
8
+ *.faiss
9
+ *.pkl
10
  # Distribution / packaging
11
  .Python
12
  build/
Dockerfile CHANGED
@@ -16,7 +16,7 @@ COPY requirements.txt .
16
  RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \
17
  pip install --no-cache-dir -r requirements.txt
18
 
19
- # Set cache locations
20
  ENV HF_HOME=/app/hf_cache/huggingface
21
  ENV HF_DATASETS_CACHE=/app/hf_cache/datasets
22
 
@@ -39,13 +39,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
39
 
40
  WORKDIR /app
41
 
42
- # Copy Python dependencies and scripts
43
  COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
44
  COPY --from=builder /usr/local/bin /usr/local/bin
45
 
46
- # Copy Hugging Face model cache and fix permissions
47
  COPY --from=builder /app/hf_cache /app/cache
48
- RUN chown -R appuser:appuser /app/cache
49
 
50
  # Copy application code
51
  COPY . .
@@ -77,4 +76,4 @@ ENV PYTHONPATH=/app \
77
  HF_DATASETS_CACHE=/app/cache/datasets
78
 
79
  # Launch FastAPI app
80
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
16
  RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \
17
  pip install --no-cache-dir -r requirements.txt
18
 
19
+ # Set Hugging Face cache environment variables
20
  ENV HF_HOME=/app/hf_cache/huggingface
21
  ENV HF_DATASETS_CACHE=/app/hf_cache/datasets
22
 
 
39
 
40
  WORKDIR /app
41
 
42
+ # Copy Python environment from builder
43
  COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
44
  COPY --from=builder /usr/local/bin /usr/local/bin
45
 
46
+ # Copy Hugging Face cache from builder
47
  COPY --from=builder /app/hf_cache /app/cache
 
48
 
49
  # Copy application code
50
  COPY . .
 
76
  HF_DATASETS_CACHE=/app/cache/datasets
77
 
78
  # Launch FastAPI app
79
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
cache/Readme.md ADDED
@@ -0,0 +1 @@
 
 
1
+ ## CACHE
database/faiss_index/Readme.md ADDED
@@ -0,0 +1 @@
 
 
1
+ ## MODELS