model1 / Dockerfile
pratyush272's picture
cache correction
5f95d6b
Raw
History Blame Contribute Delete
502 Bytes
FROM python:3.9
# Create user and set ownership/permissions
RUN useradd -m user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Switch to user before operations that need write permissions
USER user
WORKDIR $HOME/app
# Copy files with correct ownership
COPY --chown=user:user ./ ${HOME}/app
# Install requirements as user
RUN pip install --user -r requirements.txt
# Expose port if needed (optional)
EXPOSE 7860
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]