File size: 764 Bytes
4f51a47
0966609
 
 
 
4f51a47
36161f1
0966609
 
 
 
 
 
7ac80cf
0966609
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
32
33
FROM python:3.9-slim

WORKDIR /app

# Install system dependencies for OpenCV and GLib
RUN apt-get update && apt-get install -y --no-install-recommends \
    libgl1 \
    libglib2.0-0 \
    && rm -rf /var/lib/apt/lists/*

# Copy requirements first to leverage Docker cache
COPY backend/requirements_web.txt .
RUN pip install --no-cache-dir -r requirements_web.txt
RUN pip install --no-cache-dir safetensors packaging

# Copy the rest of the application
# Copy the rest of the application
COPY backend/ backend/
COPY model/ model/

# Set working directory to backend
WORKDIR /app/backend

# Create necessary directories
RUN mkdir -p uploads
RUN mkdir -p history_uploads

# Expose Hugging Face default port
EXPOSE 7860

# Run the application
CMD ["python", "app.py"]