arkitel / Dockerfile
CBV01
fix: resolve asyncio.timeout compatibility for Python < 3.11 and upgrade base image to Python 3.11
60dfd28
Raw History Blame Contribute Delete
489 Bytes
FROM python:3.11-slim
# Prepare environment
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
# Core dependencies
COPY --chown=user backend/requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Base source
COPY --chown=user backend/ .
# Network configuration
ENV PORT=7860
EXPOSE 7860
CMD ["sh", "-c", "uvicorn main:app --host 0.0.0.0 --port ${PORT:-7860} --proxy-headers --forwarded-allow-ips '*'"]