Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +23 -8
Dockerfile
CHANGED
|
@@ -1,18 +1,33 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
| 3 |
-
|
|
|
|
| 4 |
|
|
|
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
git \
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
-
|
| 10 |
-
|
| 11 |
|
| 12 |
-
|
|
|
|
| 13 |
|
| 14 |
-
|
|
|
|
| 15 |
|
|
|
|
| 16 |
EXPOSE 7860
|
| 17 |
|
| 18 |
-
|
|
|
|
|
|
| 1 |
+
# Base image
|
| 2 |
+
FROM python:3.10.13-slim
|
| 3 |
|
| 4 |
+
# Set the working directory
|
| 5 |
+
WORKDIR /home/user/app
|
| 6 |
|
| 7 |
+
# Install necessary system dependencies
|
| 8 |
RUN apt-get update && apt-get install -y \
|
| 9 |
git \
|
| 10 |
+
git-lfs \
|
| 11 |
+
ffmpeg \
|
| 12 |
+
libsm6 \
|
| 13 |
+
libxext6 \
|
| 14 |
+
cmake \
|
| 15 |
+
rsync \
|
| 16 |
+
libgl1-mesa-glx && \
|
| 17 |
+
rm -rf /var/lib/apt/lists/* && \
|
| 18 |
+
git lfs install
|
| 19 |
|
| 20 |
+
# Copy the requirements file
|
| 21 |
+
COPY requirements.txt /tmp/requirements.txt
|
| 22 |
|
| 23 |
+
# Install Python dependencies
|
| 24 |
+
RUN pip install --no-cache-dir -r /tmp/requirements.txt
|
| 25 |
|
| 26 |
+
# Copy the rest of the application
|
| 27 |
+
COPY . /home/user/app
|
| 28 |
|
| 29 |
+
# Expose the default port for Gradio
|
| 30 |
EXPOSE 7860
|
| 31 |
|
| 32 |
+
# Start the app
|
| 33 |
+
CMD ["python", "app.py"]
|