Sameer-Handsome173 commited on
Commit
296fa65
·
verified ·
1 Parent(s): 9c0f352

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -12
Dockerfile CHANGED
@@ -1,35 +1,25 @@
1
- FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
 
5
- # Install system dependencies
6
  RUN apt-get update && apt-get install -y \
7
  build-essential \
8
  curl \
9
  git \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
- # Copy requirements first for better caching
13
  COPY requirements.txt .
14
-
15
- # Install Python dependencies
16
  RUN pip install --no-cache-dir --upgrade pip && \
17
  pip install --no-cache-dir -r requirements.txt
18
 
19
- # Copy application files
20
  COPY split.py .
21
  COPY query_service.py .
22
  COPY main.py .
23
 
24
- # Create necessary directories
25
  RUN mkdir -p vectorstore/faiss_index docstore docs
26
 
27
- # Expose port
28
  EXPOSE 7860
29
 
30
- # Set environment variables
31
  ENV PYTHONUNBUFFERED=1
32
- ENV PYTHONDONTWRITEBYTECODE=1
33
 
34
- # Run the application
35
- CMD ["python", "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]
 
1
+ FROM python:3.11-slim
2
 
3
  WORKDIR /app
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  curl \
8
  git \
9
  && rm -rf /var/lib/apt/lists/*
10
 
 
11
  COPY requirements.txt .
 
 
12
  RUN pip install --no-cache-dir --upgrade pip && \
13
  pip install --no-cache-dir -r requirements.txt
14
 
 
15
  COPY split.py .
16
  COPY query_service.py .
17
  COPY main.py .
18
 
 
19
  RUN mkdir -p vectorstore/faiss_index docstore docs
20
 
 
21
  EXPOSE 7860
22
 
 
23
  ENV PYTHONUNBUFFERED=1
 
24
 
25
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]