Ahmadkhan12 commited on
Commit
84da56f
·
verified ·
1 Parent(s): 660a695

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as the base image
2
+ FROM python:3.10-slim
3
+
4
+ # Install system dependencies
5
+ RUN apt-get update && apt-get install -y \
6
+ ffmpeg \
7
+ git \
8
+ libsm6 \
9
+ libxext6 \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
+ # Set the working directory
13
+ WORKDIR /app
14
+
15
+ # Copy the requirements file into the container
16
+ COPY requirements.txt .
17
+
18
+ # Install Python dependencies
19
+ RUN pip install --no-cache-dir -r requirements.txt
20
+
21
+ # Copy the application code into the container
22
+ COPY app.py .
23
+
24
+ # Expose the port Gradio will run on
25
+ EXPOSE 7860
26
+
27
+ # Run the application
28
+ CMD ["python", "app.py"]