Spaces:
Running
Running
File size: 771 Bytes
b296661 bfd18d6 91b7015 b296661 bfd18d6 09ac7fa bfd18d6 09ac7fa bfd18d6 09ac7fa bfd18d6 b296661 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
FROM python:3.12.4
# Create a non-root user
RUN useradd -m -u 1000 user
USER user
# Set PATH to include user's local bin
ENV PATH="/home/user/.local/bin:$PATH"
# Set working directory
WORKDIR /app
# Copy requirements file with appropriate ownership
COPY --chown=user ./requirements.txt requirements.txt
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install rank_bm25
# Copy application files with appropriate ownership
COPY --chown=user . /app
# Set environment variables for Streamlit
ENV HOST=0.0.0.0
ENV PORT=7860
ENV STREAMLIT_SERVER_PORT=7860
ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
# Change the CMD to use chainlit
CMD ["streamlit", "run", "streamlit_app.py", "--server.port", "7860", "--server.address", "0.0.0.0"]
|