Spaces:
Sleeping
Sleeping
File size: 621 Bytes
c3b7038 12be578 c3b7038 12be578 c3b7038 12be578 c3b7038 12be578 c3b7038 12be578 c3b7038 12be578 c3b7038 12be578 c3b7038 12be578 c3b7038 |
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 |
FROM python:3.10-slim
# Set work directory
WORKDIR /app
COPY . .
# Set environment variable so Streamlit doesn't write to root
ENV STREAMLIT_HOME=/app/.streamlit
ENV HOME=/app
# Create the config directory manually
RUN mkdir -p /app/.streamlit
# (Optional) Add a config file to disable Streamlit telemetry and set other options
RUN echo "\
[server]\n\
headless = true\n\
port = 7860\n\
enableCORS = false\n\
\n\
" > /app/.streamlit/config.toml
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
EXPOSE 7860
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"] |