anuj-exe commited on
Commit
4d5dc68
·
verified ·
1 Parent(s): 5839686

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -0
Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.11-slim
3
+
4
+ # Set environment variables
5
+ ENV PYTHONUNBUFFERED=1
6
+ ENV PORT=7860
7
+
8
+ # Set working directory
9
+ WORKDIR /app
10
+
11
+ # Copy requirements (we'll create it next) and install dependencies
12
+ COPY requirements.txt .
13
+ RUN pip install --no-cache-dir -r requirements.txt
14
+
15
+ # Copy app code
16
+ COPY . .
17
+
18
+ # Expose port (Hugging Face Spaces uses PORT env variable)
19
+ EXPOSE $PORT
20
+
21
+ # Run the app using uvicorn
22
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]