|
|
FROM python:3.11-slim |
|
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive |
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \ |
|
|
build-essential \ |
|
|
texlive-latex-base \ |
|
|
texlive-fonts-recommended \ |
|
|
texlive-latex-recommended \ |
|
|
texlive-xetex \ |
|
|
lmodern \ |
|
|
curl \ |
|
|
git \ |
|
|
&& apt-get clean && rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
|
|
|
RUN useradd -m -u 1000 user |
|
|
|
|
|
|
|
|
ENV HOME=/home/user \ |
|
|
PATH="/home/user/.local/bin:$PATH" |
|
|
|
|
|
USER user |
|
|
|
|
|
|
|
|
COPY --chown=user . $HOME/app |
|
|
|
|
|
WORKDIR $HOME/app/hf_app |
|
|
|
|
|
RUN pip install --no-cache-dir --upgrade pip \ |
|
|
&& pip install --no-cache-dir streamlit \ |
|
|
&& pip install --no-cache-dir -r ../requirements.txt |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CMD ["streamlit", "run", "app.py", "--server.port", "8200"] |
|
|
|