dina1 commited on
Commit
d4063d8
·
verified ·
1 Parent(s): 3fb2af6

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -0
Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ===============================
2
+ # 🐳 Dockerfile for Hugging Face Spaces - FastAPI + Gemini
3
+ # ===============================
4
+
5
+ # 1️⃣ Use a lightweight Python base image
6
+ FROM python:3.10-slim
7
+
8
+ # 2️⃣ Set working directory
9
+ WORKDIR /app
10
+
11
+ # 3️⃣ Copy dependency list and install dependencies
12
+ COPY requirements.txt .
13
+ RUN pip install --no-cache-dir -r requirements.txt
14
+
15
+ # 4️⃣ Copy all project files
16
+ COPY . .
17
+
18
+ # 5️⃣ Expose the default Hugging Face port
19
+ EXPOSE 7860
20
+
21
+ # 6️⃣ Start FastAPI using uvicorn (Hugging Face detects port 7860)
22
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]