VINU NAYAK commited on
Commit
4e79baa
·
verified ·
1 Parent(s): c972075

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -2
Dockerfile CHANGED
@@ -2,6 +2,17 @@ FROM python:3.9-slim
2
 
3
  WORKDIR /app
4
 
 
 
 
 
 
 
 
 
 
 
 
5
  # Install dependencies
6
  COPY requirements.txt .
7
  RUN pip install --no-cache-dir -r requirements.txt
@@ -12,5 +23,5 @@ COPY . .
12
  # Expose the port
13
  EXPOSE 7860
14
 
15
- # Start the application
16
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # Install system dependencies
6
+ RUN apt-get update && apt-get install -y \
7
+ build-essential \
8
+ libgl1-mesa-glx \
9
+ libglib2.0-0 \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
+ # Set environment variables to avoid Numba issues
13
+ ENV NUMBA_DISABLE_JIT=1
14
+ ENV PYTHONUNBUFFERED=1
15
+
16
  # Install dependencies
17
  COPY requirements.txt .
18
  RUN pip install --no-cache-dir -r requirements.txt
 
23
  # Expose the port
24
  EXPOSE 7860
25
 
26
+ # Start the application with the fallback version
27
+ CMD ["uvicorn", "fallback:app", "--host", "0.0.0.0", "--port", "7860"]