chinmay0805 commited on
Commit
70b75ea
·
verified ·
1 Parent(s): 45e0498

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -0
Dockerfile ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ # Avoid buffering logs
4
+ ENV PYTHONUNBUFFERED=1
5
+
6
+ # Workdir inside container
7
+ WORKDIR /app
8
+
9
+ # Install system deps (optional but safe)
10
+ RUN apt-get update && apt-get install -y \
11
+ build-essential \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Copy requirements and install
15
+ COPY requirements.txt .
16
+ RUN pip install --no-cache-dir -r requirements.txt
17
+
18
+ # Copy all project files
19
+ COPY . .
20
+
21
+ # Expose port used by Hugging Face (must be 7860)
22
+ EXPOSE 7860
23
+
24
+ # Run FastAPI with uvicorn
25
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]