OmniPar / Dockerfile
banao-tech's picture
Update Dockerfile
d8e3ee5 verified
raw
history blame
838 Bytes
# 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"]