libkamaja_id / Dockerfile
leynessa's picture
Update Dockerfile
9b5ee44 verified
raw
history blame contribute delete
573 Bytes
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"]