# 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"]