Rag_SaaS_UI / Dockerfile
GodRad's picture
Upload 6 files
e64a7fa verified
Raw History Blame Contribute Delete
614 Bytes
FROM python:3.11-slim
# Set environment variables
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PORT=7860
# Create user and set permissions (HF expectation)
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
# Copy requirements and install
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy app code
COPY --chown=user . .
# Expose port
EXPOSE 7860
# Run entrypoint
ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]