ChintanSatva commited on
Commit
e505dc9
·
verified ·
1 Parent(s): 12a3547

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -8
Dockerfile CHANGED
@@ -1,7 +1,5 @@
1
- # Use official Python 3.10 slim image
2
  FROM python:3.10-slim
3
 
4
- # Set working directory
5
  WORKDIR /app
6
 
7
  # Install system dependencies
@@ -17,19 +15,18 @@ COPY requirements.txt .
17
  # Install Python dependencies
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
20
- # Copy application code
21
- COPY expense.py .
22
- COPY app.py . # Optional: Include if you want to keep /ocr endpoint
23
-
24
  # Create cache directory
25
  RUN mkdir -p /app/cache
26
 
27
- # Set environment variables
 
 
 
28
  ENV HF_HOME=/app/cache
29
  ENV NUMBA_CACHE_DIR=/app/cache
30
 
31
  # Expose port
32
  EXPOSE 7860
33
 
34
- # Run FastAPI with expense.py (default: /categorize endpoint)
35
  CMD ["uvicorn", "expense:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
  FROM python:3.10-slim
2
 
 
3
  WORKDIR /app
4
 
5
  # Install system dependencies
 
15
  # Install Python dependencies
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
 
 
 
 
18
  # Create cache directory
19
  RUN mkdir -p /app/cache
20
 
21
+ # Copy application code
22
+ COPY expense.py .
23
+
24
+ # Set environment variables for cache
25
  ENV HF_HOME=/app/cache
26
  ENV NUMBA_CACHE_DIR=/app/cache
27
 
28
  # Expose port
29
  EXPOSE 7860
30
 
31
+ # Run FastAPI with Uvicorn
32
  CMD ["uvicorn", "expense:app", "--host", "0.0.0.0", "--port", "7860"]