Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +8 -24
Dockerfile
CHANGED
@@ -1,33 +1,17 @@
|
|
1 |
-
FROM python:3.
|
2 |
|
|
|
3 |
WORKDIR /app
|
4 |
|
5 |
-
#
|
6 |
-
|
|
|
7 |
|
8 |
-
# Install
|
9 |
-
RUN apt-get update && \
|
10 |
-
apt-get install -y --no-install-recommends \
|
11 |
-
build-essential \
|
12 |
-
ffmpeg \
|
13 |
-
libsm6 \
|
14 |
-
libxext6 \
|
15 |
-
libgl1-mesa-glx \
|
16 |
-
&& apt-get clean && \
|
17 |
-
rm -rf /var/lib/apt/lists/*
|
18 |
-
|
19 |
-
# Copy requirements first for better layer caching
|
20 |
-
COPY requirements.txt .
|
21 |
RUN pip install --no-cache-dir -r requirements.txt
|
22 |
|
23 |
-
#
|
24 |
-
COPY app.py .
|
25 |
-
|
26 |
-
# Make directory writable for user
|
27 |
-
RUN chmod 777 /app
|
28 |
-
|
29 |
-
# Expose port for Gradio
|
30 |
EXPOSE 7860
|
31 |
|
32 |
-
#
|
33 |
CMD ["python", "app.py"]
|
|
|
1 |
+
FROM python:3.10-slim
|
2 |
|
3 |
+
# Set working directory
|
4 |
WORKDIR /app
|
5 |
|
6 |
+
# Copy files
|
7 |
+
COPY requirements.txt /app/requirements.txt
|
8 |
+
COPY app.py /app/app.py
|
9 |
|
10 |
+
# Install dependencies
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
RUN pip install --no-cache-dir -r requirements.txt
|
12 |
|
13 |
+
# Expose Gradio default port
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
EXPOSE 7860
|
15 |
|
16 |
+
# Run the main application
|
17 |
CMD ["python", "app.py"]
|