|
|
|
FROM python:3.9 |
|
|
|
|
|
RUN useradd -m -u 1000 user |
|
|
|
|
|
USER user |
|
|
|
|
|
ENV HOME=/home/user \ |
|
PATH=/home/user/.local/bin:$PATH |
|
|
|
|
|
WORKDIR $HOME/app |
|
|
|
|
|
USER root |
|
|
|
|
|
COPY ./requirements.txt /code/requirements.txt |
|
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt |
|
|
|
|
|
COPY --chown=user ./fruitful_patterns.json $HOME/app/fruitful_patterns.json |
|
RUN chmod 644 $HOME/app/fruitful_patterns.json |
|
|
|
|
|
RUN python -m spacy download en_core_web_md |
|
|
|
|
|
USER user |
|
|
|
|
|
COPY --chown=user . $HOME/app |
|
|
|
|
|
CMD ["streamlit", "run", "app.py", "--server.address=0.0.0.0", "--server.port=7860"] |