Pk_yolo / Dockerfile
Overreactingwallflower's picture
Create Dockerfile
f3f52bd verified
raw
history blame contribute delete
624 Bytes
# Dockerfile for Hugging Face Spaces
FROM python:3.10-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
libgomp1 \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY app.py .
COPY pokemon_yolo.pt .
# Expose port
EXPOSE 7860
# Set environment variables
ENV PORT=7860
# Run with uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]