Gopal2002 commited on
Commit
57d9674
·
verified ·
1 Parent(s): 5161b05

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use lightweight Python base
2
+ FROM python:3.10-slim
3
+
4
+ # Set workdir inside container
5
+ WORKDIR /app
6
+
7
+ # Copy requirements first (for caching layers)
8
+ COPY requirements.txt .
9
+
10
+ # Install system deps + python deps
11
+ RUN apt-get update && apt-get install -y --no-install-recommends \
12
+ git \
13
+ && rm -rf /var/lib/apt/lists/* \
14
+ && pip install --no-cache-dir -r requirements.txt
15
+
16
+ # Copy rest of the code
17
+ COPY . .
18
+
19
+ # Expose port for HF Spaces
20
+ EXPOSE 7860
21
+
22
+ # Start FastAPI app with Uvicorn
23
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]