ml-pro / Dockerfile
Muhammad Saleem
Update Dockerfile
fec024b verified
raw
history blame contribute delete
506 Bytes
FROM python:3.9-slim
# Install system dependencies (libGL is required for OpenCV)
RUN apt-get update && apt-get install -y \
libgl1-mesa-glx \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy app code
COPY . .
# Expose the port
EXPOSE 7860
# Run the app
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]