WebashalarForML commited on
Commit
20f9a15
·
verified ·
1 Parent(s): ba58da5

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -9
Dockerfile CHANGED
@@ -1,6 +1,9 @@
1
  FROM python:3.9-slim-bullseye
2
 
3
- # Environment
 
 
 
4
  ENV PYTHONUNBUFFERED=1 \
5
  PORT=7860
6
 
@@ -11,22 +14,24 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
11
  ffmpeg git curl \
12
  libgl1-mesa-glx libglib2.0-0 libsm6 libxrender1 libxext6 \
13
  build-essential \
 
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
- # Upgrade pip and install numpy before llvmlite/numba
17
- RUN pip install --upgrade pip
 
18
 
19
- # Install Gunicorn and app dependencies
20
- COPY requirements.txt .
21
  RUN pip install --no-cache-dir -r requirements.txt
22
 
23
- # Create necessary directories
24
  RUN mkdir -p cache uploads results checkpoints temp \
25
- && chmod -R 777 cache uploads results checkpoints temp
26
 
27
- # Copy application code
28
  COPY . .
29
 
30
  EXPOSE 7860
31
 
32
- CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]
 
1
  FROM python:3.9-slim-bullseye
2
 
3
+ # Disable Numba’s JIT cache (avoids Librosa/Numba caching errors)
4
+ ENV NUMBA_DISABLE_JIT=1
5
+
6
+ # Python & app environment
7
  ENV PYTHONUNBUFFERED=1 \
8
  PORT=7860
9
 
 
14
  ffmpeg git curl \
15
  libgl1-mesa-glx libglib2.0-0 libsm6 libxrender1 libxext6 \
16
  build-essential \
17
+ llvm llvm-dev clang-11 \
18
  && rm -rf /var/lib/apt/lists/*
19
 
20
+ # Upgrade pip and pre‑install numpy
21
+ RUN pip install --upgrade pip
22
+ # && pip install numpy==1.21.6
23
 
24
+ # Install Gunicorn + Python deps
25
+ COPY requirements.txt .
26
  RUN pip install --no-cache-dir -r requirements.txt
27
 
28
+ # Create directories
29
  RUN mkdir -p cache uploads results checkpoints temp \
30
+ && chmod -R 777 cache uploads results checkpoints temp
31
 
32
+ # Copy app code
33
  COPY . .
34
 
35
  EXPOSE 7860
36
 
37
+ CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]