Spaces:
Runtime error
Runtime error
Switch to Docker SDK to fix build error due to missing libgl1-mesa-glx
Browse filesSwitch the Space to use the Docker SDK by adding a Dockerfile that installs required system packages (git, ffmpeg, libgl dependencies, etc.) and sets up Python and our app. This bypasses the default apt-get command which fails to install libgl1-mesa-glx on the Trixie base image. Added packages.txt with libgl1, libglx-mesa0 and libglib2.0-0 for completeness. Updated README.md's YAML front matter to set sdk: docker. These changes should resolve the build error and allow our app with JSON-based outlines to run.
- Dockerfile +21 -0
- README.md +1 -2
- packages.txt +3 -0
Dockerfile
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
| 2 |
+
|
| 3 |
+
# Install system dependencies
|
| 4 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 5 |
+
git git-lfs ffmpeg libsm6 libxext6 cmake rsync libgl1 libglx-mesa0 libglib2.0-0 \
|
| 6 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 7 |
+
|
| 8 |
+
# Set working directory
|
| 9 |
+
WORKDIR /app
|
| 10 |
+
|
| 11 |
+
# Copy project files
|
| 12 |
+
COPY . /app
|
| 13 |
+
|
| 14 |
+
# Install Python dependencies
|
| 15 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 16 |
+
|
| 17 |
+
# Expose port for Gradio (default 7860)
|
| 18 |
+
EXPOSE 7860
|
| 19 |
+
|
| 20 |
+
# Start the Gradio application
|
| 21 |
+
CMD ["python", "app.py"]
|
README.md
CHANGED
|
@@ -2,8 +2,7 @@
|
|
| 2 |
title: Course Creator
|
| 3 |
emoji: π
|
| 4 |
license: mit
|
| 5 |
-
sdk:
|
| 6 |
-
app_file: app.py
|
| 7 |
pinned: false
|
| 8 |
---
|
| 9 |
|
|
|
|
| 2 |
title: Course Creator
|
| 3 |
emoji: π
|
| 4 |
license: mit
|
| 5 |
+
sdk: docker
|
|
|
|
| 6 |
pinned: false
|
| 7 |
---
|
| 8 |
|
packages.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
libgl1
|
| 2 |
+
libglx-mesa0
|
| 3 |
+
libglib2.0-0
|