Spaces:
Sleeping
Sleeping
Create docker
Browse files
docker
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ----------------------------
|
| 2 |
+
# Base image: Python 3.11
|
| 3 |
+
# ----------------------------
|
| 4 |
+
FROM python:3.11-slim
|
| 5 |
+
|
| 6 |
+
# ----------------------------
|
| 7 |
+
# Set working directory
|
| 8 |
+
# ----------------------------
|
| 9 |
+
WORKDIR /home/user/app
|
| 10 |
+
|
| 11 |
+
# ----------------------------
|
| 12 |
+
# System dependencies
|
| 13 |
+
# ----------------------------
|
| 14 |
+
RUN apt-get update && apt-get install -y \
|
| 15 |
+
git \
|
| 16 |
+
git-lfs \
|
| 17 |
+
ffmpeg \
|
| 18 |
+
libsm6 \
|
| 19 |
+
libxext6 \
|
| 20 |
+
cmake \
|
| 21 |
+
rsync \
|
| 22 |
+
libgl1 \
|
| 23 |
+
curl \
|
| 24 |
+
&& rm -rf /var/lib/apt/lists/* \
|
| 25 |
+
&& git lfs install
|
| 26 |
+
|
| 27 |
+
# ----------------------------
|
| 28 |
+
# Node.js (if needed for Gradio frontend)
|
| 29 |
+
# ----------------------------
|
| 30 |
+
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
| 31 |
+
&& apt-get install -y nodejs \
|
| 32 |
+
&& rm -rf /var/lib/apt/lists/* \
|
| 33 |
+
&& apt-get clean
|
| 34 |
+
|
| 35 |
+
# ----------------------------
|
| 36 |
+
# Upgrade pip
|
| 37 |
+
# ----------------------------
|
| 38 |
+
RUN pip install --no-cache-dir --upgrade pip
|
| 39 |
+
|
| 40 |
+
# ----------------------------
|
| 41 |
+
# Install Python dependencies
|
| 42 |
+
# ----------------------------
|
| 43 |
+
COPY requirements.txt /tmp/requirements.txt
|
| 44 |
+
RUN pip install --no-cache-dir -r /tmp/requirements.txt
|
| 45 |
+
|
| 46 |
+
# ----------------------------
|
| 47 |
+
# Copy app code
|
| 48 |
+
# ----------------------------
|
| 49 |
+
COPY --chown=1000:1000 . /home/user/app
|
| 50 |
+
|
| 51 |
+
# ----------------------------
|
| 52 |
+
# Expose port (for Gradio or API)
|
| 53 |
+
# ----------------------------
|
| 54 |
+
EXPOSE 7860
|
| 55 |
+
|
| 56 |
+
# ----------------------------
|
| 57 |
+
# Default command
|
| 58 |
+
# ----------------------------
|
| 59 |
+
CMD ["python", "app.py"]
|