File size: 838 Bytes
67cc59d
d8e3ee5
67cc59d
91ae803
8572c92
c3833c6
 
 
 
 
 
 
 
 
 
 
5cd2744
 
 
 
c29d787
67cc59d
91ae803
2aa9adc
67cc59d
 
91ae803
67cc59d
 
 
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
# Use the base image from your Hugging Face space
FROM registry.huggingface.co/banao-tech/OmniParser1:lates  # Replace with your username if it's hosted by you

USER root

# Install Python and system dependencies in a single layer
RUN apt-get update && apt-get install -y --no-install-recommends \
    python3.10 \
    python3-pip \
    libgl1 \
    libglib2.0-0 \
    libsm6 \
    libxext6 \
    libxrender-dev \
    && ln -s /usr/bin/python3.10 /usr/bin/python \
    && rm -rf /var/lib/apt/lists/*
    
# Copy and install Python requirements
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy your Python files
COPY main.py main.py
COPY utils.py utils.py

# Run your main script
RUN python main.py

# Start the application using Uvicorn
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]