File size: 1,019 Bytes
625227c ef3c2f6 21b8f62 1e4a8f9 46392f1 f57fe19 625227c 925d182 625227c 004ef82 b709c04 625227c a118ec8 |
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 40 41 42 |
# Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
# you will also find guides on how best to write your Dockerfile
FROM python:3.9
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
ENV STREAMLIT_SERVER_PORT="7680"
ENV STREAMLIT_SERVER_HEADLESS="false"
ENV STREAMLIT_SERVER_ADDRESS="0.0.0.0"
ENV STREAMLIT_EMAIL_ADDRESS="no"
ENV STREAMLIT_TELEMETRY="off"
ENV STREAMLIT_SECRETS_FILES="/app/.streamlit"
ENV STREAMLIT_HOME="/app/.streamlit"
WORKDIR /app
# Create the config file to disable email prompt and telemetry
RUN echo "\
[server]\n\
headless = true\n\
port = 7680\n\
enableCORS = false\n\
\n\
[general]\n\
email = \"no\"\n\
\n\
[logger]\n\
level = \"error\"\n\
\n\
[browser]\n\
gatherUsageStats = false\n\
" > /app/config.toml
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
RUN chmod 777 ./
RUN python -m playwright install
COPY --chown=user . /app
CMD ["streamlit","run", "app.py",">","dev/null"]
|