File size: 1,494 Bytes
5f9062d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
FROM python:3.9-slim

# Set working directory early
WORKDIR /app

# Install system dependencies with cleanup
RUN apt-get update && apt-get install -y --no-install-recommends \
    ffmpeg \
    git \
    libgl1-mesa-glx \
    libglib2.0-0 \
    build-essential \
    python3-dev \
    libjpeg-dev \
    libpng-dev \
 && rm -rf /var/lib/apt/lists/*

# Copy only what’s needed early for caching
COPY requirements.txt .
COPY scripts ./scripts
COPY configs ./configs

# Upgrade pip + install Python deps
RUN pip install --upgrade pip && \
    pip install --no-cache-dir -r requirements.txt
# Install LiveKit SDKs
RUN pip install --no-cache-dir \
    livekit==1.0.7 \
    livekit-api==1.0.2 \
    omegaconf \
    transformers==4.39.3 \
 && pip uninstall -y protobuf && pip install --no-cache-dir protobuf==3.20.3

# Install pose dependencies (with caching minimized)
RUN pip install --no-cache-dir cython && \
    pip install --no-cache-dir git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI

RUN pip install --no-cache-dir mmengine==0.10.7 mmcv==2.0.0rc4 && \
    pip install --no-cache-dir openmim && \
    mim install mmpose && \
    mim install mmdet

# Copy rest of the code
COPY . .

# Final cleanup (in case anything big remains)
RUN apt-get clean && \
    find /root/.cache -type f -delete && \
    rm -rf /root/.cache/pip

# Set entrypoint
# CMD ["python3", "-m", "scripts.realtime_inference", "--version", "v15", "--inference_config", "configs/inference/realtime.yaml"]