Spaces:
Sleeping
Sleeping
FROM python:3.9-slim | |
WORKDIR /code | |
# Copy requirements and install dependencies | |
COPY requirements.txt . | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Copy application files | |
COPY . . | |
# Create streamlit config directory | |
RUN mkdir -p /root/.streamlit | |
# Create streamlit config | |
RUN echo "[server]\nenabledXsrfProtection = false\nport = 7860\nheadless = true\n\n[browser]\ngatherUsageStats = false" > /root/.streamlit/config.toml | |
# Expose port | |
EXPOSE 7860 | |
# Run the app | |
CMD ["streamlit", "run", "streamlit_app.py", "--server.address=0.0.0.0", "--server.port=7860"] |