File size: 909 Bytes
4283005
e65a8eb
20f9a15
 
 
 
1807fbf
3bc7327
e65a8eb
 
 
3bc7327
35e2a0f
 
 
 
20f9a15
e65a8eb
 
20f9a15
 
 
35e2a0f
20f9a15
 
3eda5c9
35e2a0f
20f9a15
3bc7327
20f9a15
35e2a0f
20f9a15
e65a8eb
 
 
35e2a0f
20f9a15
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM python:3.9-slim-bullseye

# Disable Numba’s JIT cache (avoids Librosa/Numba caching errors)
ENV NUMBA_DISABLE_JIT=1

# Python & app environment
ENV PYTHONUNBUFFERED=1 \
    PORT=7860

WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
    ffmpeg git curl \
    libgl1-mesa-glx libglib2.0-0 libsm6 libxrender1 libxext6 \
    build-essential \
    llvm llvm-dev clang-11 \
    && rm -rf /var/lib/apt/lists/*

# Upgrade pip and pre‑install numpy
RUN pip install --upgrade pip 
# && pip install numpy==1.21.6

# Install Gunicorn + Python deps
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Create directories
RUN mkdir -p cache uploads results checkpoints temp \
 && chmod -R 777 cache uploads results checkpoints temp

# Copy app code
COPY . .

EXPOSE 7860

CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]