SuperKart_Frontend / Dockerfile
Akshat747's picture
Update Dockerfile
c2b2a8e verified
raw
history blame contribute delete
549 Bytes
FROM python:3.11-slim
# Create non-root user that matches Spaces runtime (uid 1000), set HOME
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
# Install dependencies as the user
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy app code with correct ownership
COPY --chown=user . .
EXPOSE 8501
ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]