t3k45h1 commited on
Commit
326e1e4
·
verified ·
1 Parent(s): af6b53d

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -0
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use lightweight Python base
2
+ FROM python:3.10-slim
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # Install git and any system dependencies
8
+ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
9
+
10
+ # Copy and install Python dependencies
11
+ COPY requirements.txt .
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
+
14
+ # Copy your app code
15
+ COPY . .
16
+
17
+ # Expose the port FastAPI will run on
18
+ EXPOSE 7860
19
+
20
+ # Run FastAPI app via uvicorn
21
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]