Spaces:
Running
Running
add dockerfile to fix build error
Browse files- dockerfile +32 -0
dockerfile
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Start from the official, clean Python 3.10 image
|
2 |
+
FROM python:3.10
|
3 |
+
|
4 |
+
# Set up the working directory inside the container
|
5 |
+
WORKDIR /home/user/app
|
6 |
+
|
7 |
+
# THIS IS THE FIX:
|
8 |
+
# Install the essential system libraries, including the correct, modern graphics library (libgl1)
|
9 |
+
# and other tools that the Hugging Face environment needs.
|
10 |
+
RUN apt-get update && apt-get install -y \
|
11 |
+
git \
|
12 |
+
git-lfs \
|
13 |
+
ffmpeg \
|
14 |
+
libsm6 \
|
15 |
+
libxext6 \
|
16 |
+
cmake \
|
17 |
+
rsync \
|
18 |
+
libgl1 \
|
19 |
+
&& rm -rf /var/lib/apt/lists/* \
|
20 |
+
&& git lfs install
|
21 |
+
|
22 |
+
# Copy your requirements file into the container
|
23 |
+
COPY requirements.txt .
|
24 |
+
|
25 |
+
# Install all of your Python libraries
|
26 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
27 |
+
|
28 |
+
# Copy the rest of your application code into the container
|
29 |
+
COPY . .
|
30 |
+
|
31 |
+
# Tell the container what command to run when it starts
|
32 |
+
CMD ["python", "media.py"]
|