WebashalarForML commited on
Commit
3c3c37a
·
verified ·
1 Parent(s): 0cfa206

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -9
Dockerfile CHANGED
@@ -1,14 +1,15 @@
1
  FROM python:3.9-slim
2
 
3
- # Environment configuration
4
  ENV PYTHONDONTWRITEBYTECODE=1 \
5
  PYTHONUNBUFFERED=1 \
6
- PORT=7860
 
7
 
8
  # Working directory
9
  WORKDIR /app
10
 
11
- # Install system dependencies
12
  RUN apt-get update && apt-get install -y --no-install-recommends \
13
  ffmpeg \
14
  git \
@@ -18,23 +19,24 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
18
  libsm6 \
19
  libxrender1 \
20
  libxext6 \
21
- llvm \
22
  build-essential \
 
 
23
  && rm -rf /var/lib/apt/lists/*
24
 
25
- # Pre-install numpy to resolve numba setup dependency
26
  RUN pip install --upgrade pip
27
  RUN pip install numpy==1.21.6
28
 
29
- # Copy requirements and install remaining dependencies
30
  COPY requirements.txt .
31
  RUN pip install --no-cache-dir -r requirements.txt
32
 
33
- # Copy all application files
34
  COPY . .
35
 
36
- # Expose Hugging Face Gradio/Flask port
37
  EXPOSE 7860
38
 
39
- # Launch app with Gunicorn
40
  CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]
 
1
  FROM python:3.9-slim
2
 
3
+ # Environment config
4
  ENV PYTHONDONTWRITEBYTECODE=1 \
5
  PYTHONUNBUFFERED=1 \
6
+ PORT=7860 \
7
+ LLVM_CONFIG=/usr/lib/llvm-10/bin/llvm-config
8
 
9
  # Working directory
10
  WORKDIR /app
11
 
12
+ # Install system dependencies including LLVM 10
13
  RUN apt-get update && apt-get install -y --no-install-recommends \
14
  ffmpeg \
15
  git \
 
19
  libsm6 \
20
  libxrender1 \
21
  libxext6 \
 
22
  build-essential \
23
+ llvm-10 \
24
+ llvm-10-dev \
25
  && rm -rf /var/lib/apt/lists/*
26
 
27
+ # Upgrade pip and install numpy early (needed for numba)
28
  RUN pip install --upgrade pip
29
  RUN pip install numpy==1.21.6
30
 
31
+ # Copy requirements and install Python dependencies
32
  COPY requirements.txt .
33
  RUN pip install --no-cache-dir -r requirements.txt
34
 
35
+ # Copy app files
36
  COPY . .
37
 
38
+ # Expose port
39
  EXPOSE 7860
40
 
41
+ # Run app with Gunicorn
42
  CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]