Spaces:
Running
Running
FROM python:3.11-slim | |
ENV DEBIAN_FRONTEND=noninteractive | |
# Combine apt-get update, install, clean, and remove apt lists into a single RUN statement | |
RUN apt-get update && apt-get install -y --no-install-recommends \ | |
git \ | |
ffmpeg \ | |
&& apt-get clean \ | |
&& rm -rf /var/lib/apt/lists/* | |
RUN useradd -m -u 1000 user | |
USER user | |
ENV HOME="/home/user" | |
ENV PATH="${HOME}/.local/bin:$PATH" | |
# Set the working directory | |
WORKDIR $HOME/app | |
COPY --chown=user:user . . | |
RUN pip install --upgrade pip && \ | |
pip install -r requirements.txt | |
EXPOSE 7860 | |
# Start the Streamlit app | |
CMD streamlit run Home.py --server.port 7860 --server.address 0.0.0.0 --server.enableXsrfProtection false | |