d221/Qdrant_Backend
0
1FROM python:3.122 3WORKDIR /app4 5# Create user with proper PATH configuration6RUN useradd -m appuser && \7 echo 'export PATH="$HOME/.local/bin:$PATH"' >> /home/appuser/.bashrc8 9# System dependencies10RUN apt-get update && apt-get install -y git11 12# Set environment variables13#ENV PATH="/home/appuser/.local/bin:${PATH}" \14# PYTHONPATH="/app:${PYTHONPATH}" \15# PIP_NO_WARN_SCRIPT_LOCATION=0)16 17# Switch to non-root user18USER appuser19 20# Install Python dependencies21COPY requirements.txt .22RUN pip install --user --no-cache-dir -r requirements.txt23 24# Copy application files25COPY --chown=appuser:appuser . .26 27# Verify uvicorn location28RUN which uvicorn && echo $PATH29 30# Launch command31CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]32 33 