arif670 commited on
Commit
b564f11
·
verified ·
1 Parent(s): 3152268

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a lightweight Python base image
2
+ FROM python:3.9-slim
3
+
4
+ # Set working directory inside the container
5
+ WORKDIR /app
6
+
7
+ # Install system dependencies (if needed)
8
+ RUN apt-get update && apt-get install -y \
9
+ build-essential \
10
+ cmake \
11
+ git \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Copy requirements.txt to the container
15
+ COPY requirements.txt /tmp/requirements.txt
16
+
17
+ # Install Python dependencies
18
+ RUN pip install --no-cache-dir -r /tmp/requirements.txt
19
+
20
+ # Copy the rest of the application code
21
+ COPY . /app
22
+
23
+ # Expose the port where the app will run (default for Gradio is 7860)
24
+ EXPOSE 7860
25
+
26
+ # Command to run the app
27
+ CMD ["python", "app.py"]