File size: 643 Bytes
f80d2cf
a52d6b1
b0e9f06
a52d6b1
b0e9f06
 
a52d6b1
 
 
 
 
 
f80d2cf
 
b0e9f06
a52d6b1
 
b0e9f06
a52d6b1
f80d2cf
 
a52d6b1
b0e9f06
 
a52d6b1
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Use official Python image as base
FROM python:3.9-slim

# Set the working directory inside the container
WORKDIR /app

# Install system dependencies for OpenCV and other libraries
RUN apt-get update && apt-get install -y \
    libgl1-mesa-glx \
    libglib2.0-0 \
    && rm -rf /var/lib/apt/lists/*

# Copy the requirements file
COPY requirements.txt .

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

# Copy the model and application files
COPY . .

# Expose the FastAPI port (7860 for Hugging Face)
EXPOSE 7860

# Run FastAPI with Uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]