Nandly_backend / Dockerfile
Anand Sharma
Debug: Simplify boot and set PYTHONPATH
2c82ff2
Raw
History Blame Contribute Delete
535 Bytes
FROM python:3.11-slim
# Set up a new user with UID 1000
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# SIMPLIFIED: No model pre-download for now to ensure boot
COPY --chown=user . .
# EXPOSE port 7860
EXPOSE 7860
# We use the absolute path and explicit PYTHONPATH
ENV PYTHONPATH=$HOME/app
CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860"]