ucprojects-backend / Dockerfile
AdeshRathod
Ensure python-multipart is installed in Dockerfile to avoid cache issues
9d11a70
Raw History Blame Contribute Delete
688 Bytes
FROM python:3.11-slim
WORKDIR /app
# Install build dependencies for some Python packages
RUN apt-get update && apt-get install -y build-essential gcc git && rm -rf /var/lib/apt/lists/*
COPY requirements.txt ./
RUN pip install --no-cache-dir -U pip
RUN pip install --no-cache-dir -r requirements.txt
# Ensure python-multipart is present even if cache/stale requirements layer is reused
RUN pip install --no-cache-dir python-multipart
COPY . /app
# Use port 7860 which is commonly routed by hosting platforms like Hugging Face Spaces
EXPOSE 7860
# Start the app on port 7860
CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "7860", "--loop", "asyncio", "--http", "h11"]