Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +23 -6
Dockerfile
CHANGED
|
@@ -1,10 +1,27 @@
|
|
| 1 |
-
FROM
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
|
|
|
|
|
|
| 7 |
|
| 8 |
-
|
|
|
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
|
| 3 |
+
# Set env
|
| 4 |
+
ENV DEBIAN_FRONTEND=noninteractive \
|
| 5 |
+
PYTHONDONTWRITEBYTECODE=1 \
|
| 6 |
+
PYTHONUNBUFFERED=1
|
| 7 |
|
| 8 |
+
# Install system dependencies
|
| 9 |
+
RUN apt-get update && apt-get install -y \
|
| 10 |
+
git curl build-essential ffmpeg libsm6 libxext6 \
|
| 11 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
+
# Create working directory
|
| 14 |
+
WORKDIR /app
|
| 15 |
|
| 16 |
+
# Clone Docker Model Runner source manually
|
| 17 |
+
RUN git clone https://github.com/docker/model-runner /app/model-runner
|
| 18 |
+
|
| 19 |
+
# Install Model Runner dependencies
|
| 20 |
+
RUN pip install --upgrade pip && \
|
| 21 |
+
pip install -r model-runner/requirements.txt
|
| 22 |
+
|
| 23 |
+
# Copy model.yaml (ensure it's in repo)
|
| 24 |
+
COPY model.yaml /app/model.yaml
|
| 25 |
+
|
| 26 |
+
# Run model-runner with the local config
|
| 27 |
+
CMD ["python", "model-runner/main.py", "--model-config", "/app/model.yaml"]
|