File size: 954 Bytes
fa724d4
d663a27
fa724d4
 
23f8dc9
fa724d4
 
95474d1
fa724d4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95474d1
fa724d4
 
95474d1
23f8dc9
fa724d4
 
 
9538b58
789b038
 
 
 
 
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.12-slim

# Avoid interactive prompts during build
ENV DEBIAN_FRONTEND=noninteractive

# Install system dependencies with libGL auto-detection
RUN apt-get update && apt-get install -y --no-install-recommends \
    git \
    git-lfs \
    ffmpeg \
    libsm6 \
    libxext6 \
    cmake \
    rsync \
    && if apt-cache show libgl1 >/dev/null 2>&1; then \
        apt-get install -y libgl1; \
    elif apt-cache show libgl1-mesa-glx >/dev/null 2>&1; then \
        apt-get install -y libgl1-mesa-glx; \
    else \
        echo "ERROR: Neither libgl1 nor libgl1-mesa-glx found" && exit 1; \
    fi \
    && rm -rf /var/lib/apt/lists/* \
    && git lfs install

# Copy dependency file & install Python packages
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy source code
COPY . /app
WORKDIR /app

# Make sure start.sh is executable
RUN chmod +x ./start.sh

# Use this CMD to run the script
CMD ["./start.sh"]