File size: 787 Bytes
4283005
e65a8eb
35e2a0f
1807fbf
3bc7327
e65a8eb
 
 
3bc7327
35e2a0f
 
 
 
e65a8eb
 
35e2a0f
 
 
3bc7327
 
3eda5c9
35e2a0f
3bc7327
 
 
35e2a0f
 
e65a8eb
 
 
35e2a0f
3bc7327
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
FROM python:3.9-slim-bullseye

# 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 \
    && rm -rf /var/lib/apt/lists/*

# Upgrade pip and install numpy before llvmlite/numba
RUN pip install --upgrade pip

# Install Gunicorn and app dependencies
COPY requirements.txt .  
RUN pip install --no-cache-dir -r requirements.txt

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

# Copy application code
COPY . .

EXPOSE 7860

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