File size: 844 Bytes
963ae3a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# Start from the official, clean Python 3.10 image
FROM python:3.10

# Set up the working directory inside the container
WORKDIR /home/user/app

# THIS IS THE FIX:
# Install the essential system libraries, including the correct, modern graphics library (libgl1)
# and other tools that the Hugging Face environment needs.
RUN apt-get update && apt-get install -y \
    git \
    git-lfs \
    ffmpeg \
    libsm6 \
    libxext6 \
    cmake \
    rsync \
    libgl1 \
    && rm -rf /var/lib/apt/lists/* \
    && git lfs install

# Copy your requirements file into the container
COPY requirements.txt .

# Install all of your Python libraries
RUN pip install --no-cache-dir -r requirements.txt

# Copy the rest of your application code into the container
COPY . .

# Tell the container what command to run when it starts
CMD ["python", "media.py"]