Spaces:
Sleeping

yoloapi / Dockerfile
low-key-007's picture
Update Dockerfile
ebf28b2 verified
Raw History Blame Contribute Delete
498 Bytes
FROM python:3.10-slim
# Install system dependencies for OpenCV
RUN apt-get update && apt-get install -y \
git \
wget \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy app files
COPY . .
# Expose port for Hugging Face Spaces
EXPOSE 7860
# Start FastAPI with Uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]