ruslanmv commited on
Commit
f72d2d6
·
1 Parent(s): 5e8bd24
Dockerfile CHANGED
@@ -2,7 +2,8 @@ FROM python:3.10.8
2
 
3
  WORKDIR /app
4
 
5
- COPY requirements.txt /app/requirements.txt
 
6
 
7
  # Create cache and milvus_data directories and set permissions
8
  RUN mkdir -p /app/cache /app/milvus_data && chmod -R 777 /app/cache /app/milvus_data
@@ -20,11 +21,11 @@ ENV HF_HOME=/app/cache \
20
  MILVUS_DATA_DIR=/app/milvus_data \
21
  HF_WORKER_COUNT=1
22
 
23
- # Copy the application code
24
  COPY . /app
25
 
26
  # Expose the port Uvicorn will run on
27
  EXPOSE 7860
28
 
29
- # Start Uvicorn
30
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # Copy only requirements.txt first to leverage Docker caching
6
+ COPY requirements.txt /app/
7
 
8
  # Create cache and milvus_data directories and set permissions
9
  RUN mkdir -p /app/cache /app/milvus_data && chmod -R 777 /app/cache /app/milvus_data
 
21
  MILVUS_DATA_DIR=/app/milvus_data \
22
  HF_WORKER_COUNT=1
23
 
24
+ # Copy the application code (now main.py is at the root)
25
  COPY . /app
26
 
27
  # Expose the port Uvicorn will run on
28
  EXPOSE 7860
29
 
30
+ # Start Uvicorn (main:app is correct now)
31
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
app/requirements.txt DELETED
@@ -1,13 +0,0 @@
1
- pymilvus==2.4.5
2
- sentence-transformers==3.0.1
3
- huggingface-hub==0.24.5
4
- langchain_community==0.2.12
5
- langchain-text-splitters==0.2.2
6
- langchain==0.2.14
7
- pypdf==4.3.1
8
- tqdm==4.66.5
9
- flask
10
- flask_cors
11
- fastapi
12
- uvicorn
13
- python-multipart
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/main.py → main.py RENAMED
File without changes
app/milvus_singleton.py → milvus_singleton.py RENAMED
File without changes