summariser / Dockerfile
Eearthling's picture
Upload 2 files
dac9fa6 verified
raw
history blame contribute delete
676 Bytes
FROM python:3.10-slim
WORKDIR /code
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
# Install python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Create a non-root user
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
COPY --chown=user download_models.py .
RUN python download_models.py
COPY --chown=user . $HOME/app
EXPOSE 7860
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]