File size: 744 Bytes
0f0c87e
e6bfd88
 
6aa028b
e6bfd88
 
 
 
fcee632
 
3c1cdfc
 
 
 
 
 
 
 
e6bfd88
0f0c87e
e6bfd88
 
 
 
 
c4ccb12
e6bfd88
 
c4ccb12
 
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
28
29
30
31
FROM python:3.9

# Set working directory
WORKDIR /app

# Install system dependencies for OpenCV
RUN apt-get update && apt-get install -y libgl1 && apt-get clean && rm -rf /var/lib/apt/lists/*

COPY .git .git

# ─── Install Git LFS & fetch the real model file ────────────────────────
RUN apt-get update \
 && apt-get install -y git-lfs libgl1 \
 && git lfs install \
 && git lfs pull \
 && apt-get clean \
 && rm -rf /var/lib/apt/lists/*

# Copy application files
COPY . /app

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

# Expose the port
EXPOSE 7860

# Command to start Uvicorn
CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port ${PORT:-7860}"]