moondream-docker-api/Dockerfile

25 lines
488 B
Docker

FROM python:3.10-slim
# Environment setup
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /app
# System dependencies
RUN apt-get update && apt-get install -y \
build-essential \
libjpeg-dev \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the app code and image
COPY . .
# Set the entrypoint
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "3000"]