File size: 492 Bytes
0e7e965
0e45313
 
 
 
 
 
 
 
 
 
 
 
 
 
15f5e73
 
0e45313
 
 
0e7e965
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# API Dockerfile Optimized
FROM python:3.12-slim

WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y \
    build-essential \
    curl \
    && rm -rf /var/lib/apt/lists/*

# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy all project files
COPY . .

EXPOSE 8000

# Execute setup script THEN start the API
CMD ["sh", "-c", "python setup_models.py && uvicorn main:app --host 0.0.0.0 --port 8000"]