Spaces:
Sleeping
Sleeping
FROM registry.hf.space/banao-tech/omniparser1:latest | |
#huggingface.co/spaces/banao-tech/OmniParser1 | |
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 main.py main.py | |
COPY utils.py utils.py | |
RUN python main.py | |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |