alaselababatunde commited on
Commit
4769156
·
1 Parent(s): bb12219
Files changed (1) hide show
  1. Dockerfile +27 -0
Dockerfile CHANGED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use lightweight Python image
2
+ FROM python:3.10-slim
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # Install system dependencies (for some models/libraries)
8
+ RUN apt-get update && apt-get install -y \
9
+ build-essential \
10
+ curl \
11
+ git \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Copy requirements first for caching
15
+ COPY requirements.txt .
16
+
17
+ # Install Python dependencies
18
+ RUN pip install --no-cache-dir -r requirements.txt
19
+
20
+ # Copy project files
21
+ COPY . .
22
+
23
+ # Expose FastAPI default port
24
+ EXPOSE 8000
25
+
26
+ # Command to run FastAPI with Uvicorn
27
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]