AhsanAftab commited on
Commit
c8f379c
·
verified ·
1 Parent(s): 1e493ce

Create Docker file

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Python 3.10
2
+ FROM python:3.10
3
+
4
+ # Set working directory to /code
5
+ WORKDIR /code
6
+
7
+ # Copy the requirements file
8
+ COPY requirements.txt .
9
+
10
+ # Install dependencies
11
+ # We add --no-cache-dir to keep the image small
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
+
14
+ # Copy all your backend files (app.py, inference.py, etc.)
15
+ COPY . .
16
+
17
+ # Create the models directory (just in case) and set permissions
18
+ RUN mkdir -p /code/models && chmod 777 /code/models
19
+
20
+ # Expose the correct port
21
+ EXPOSE 7860
22
+
23
+ # Command to run the application
24
+ CMD ["python", "app.py"]