Anasbf commited on
Commit
f8982fc
·
verified ·
1 Parent(s): 30942cb

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -18
Dockerfile CHANGED
@@ -1,27 +1,22 @@
1
- # Use a lightweight Python base image
2
- FROM python:3.9-slim
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
- # Copy project files
14
- COPY . /app
15
 
16
- # Install Python dependencies
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
- # Expose the default Gradio port
 
 
24
  EXPOSE 7860
25
 
26
- # Command to run the Gradio app
27
- CMD ["python", "app.py"]
 
 
 
 
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"]