Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +8 -15
Dockerfile
CHANGED
@@ -1,26 +1,19 @@
|
|
1 |
-
FROM python:3.
|
2 |
|
|
|
3 |
WORKDIR /app
|
4 |
|
5 |
-
#
|
6 |
RUN apt-get update && apt-get install -y \
|
7 |
-
|
8 |
-
|
9 |
-
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
10 |
|
11 |
-
# Copy
|
12 |
-
COPY requirements.txt
|
13 |
RUN pip install --no-cache-dir -r requirements.txt
|
14 |
|
15 |
-
# Copy application code
|
16 |
COPY app.py .
|
17 |
|
18 |
-
|
19 |
-
ENV GRADIO_SERVER_NAME=0.0.0.0
|
20 |
-
ENV GRADIO_SERVER_PORT=7860
|
21 |
|
22 |
-
# Expose the port
|
23 |
-
EXPOSE 7860
|
24 |
-
|
25 |
-
# Run the application
|
26 |
CMD ["python", "app.py"]
|
|
|
1 |
+
FROM python:3.10-slim
|
2 |
|
3 |
+
# Set working directory
|
4 |
WORKDIR /app
|
5 |
|
6 |
+
# System dependencies
|
7 |
RUN apt-get update && apt-get install -y \
|
8 |
+
libgl1 \
|
9 |
+
&& rm -rf /var/lib/apt/lists/*
|
|
|
10 |
|
11 |
+
# Copy files
|
12 |
+
COPY requirements.txt ./
|
13 |
RUN pip install --no-cache-dir -r requirements.txt
|
14 |
|
|
|
15 |
COPY app.py .
|
16 |
|
17 |
+
EXPOSE 5000
|
|
|
|
|
18 |
|
|
|
|
|
|
|
|
|
19 |
CMD ["python", "app.py"]
|