smart-volume-control / Dockerfile
aiengrimran's picture
updater docker issue
8d61c9a
raw
history blame contribute delete
584 Bytes
FROM python:3.11-slim
# Install system dependencies (needed for OpenCV, torch, etc.)
RUN apt-get update && apt-get install -y --no-install-recommends \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements first (for better caching)
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the app code
COPY . .
# Expose the Hugging Face port
EXPOSE 7860
# Run the FastAPI app
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]