Update Dockerfile
Browse files- Dockerfile +13 -18
Dockerfile
CHANGED
|
@@ -1,27 +1,22 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
|
| 4 |
-
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Install system dependencies
|
| 8 |
-
RUN apt-get update && apt-get install -y \
|
| 9 |
-
libgl1-mesa-glx \
|
| 10 |
-
libglib2.0-0 \
|
| 11 |
-
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
-
|
| 14 |
-
|
| 15 |
|
| 16 |
-
|
| 17 |
-
RUN pip install --upgrade pip
|
| 18 |
-
RUN pip install -r requirements.txt
|
| 19 |
|
| 20 |
-
# Set the environment variable for protobuf compatibility
|
| 21 |
-
ENV PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
|
| 22 |
|
| 23 |
-
|
|
|
|
|
|
|
| 24 |
EXPOSE 7860
|
| 25 |
|
| 26 |
-
#
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
| 2 |
+
|
| 3 |
|
|
|
|
| 4 |
WORKDIR /app
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
+
COPY requirements.txt .
|
| 8 |
+
|
| 9 |
|
| 10 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
|
| 11 |
|
|
|
|
|
|
|
| 12 |
|
| 13 |
+
COPY . .
|
| 14 |
+
|
| 15 |
+
# Expose the port 7860
|
| 16 |
EXPOSE 7860
|
| 17 |
|
| 18 |
+
# environment variables
|
| 19 |
+
ENV GRADIO_SERVER_NAME=0.0.0.0
|
| 20 |
+
|
| 21 |
+
# Run the Gradio app
|
| 22 |
+
CMD ["python", "app.py"]
|