Spaces:
Sleeping
Sleeping
File size: 970 Bytes
6609c06 | 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 | #
# -- Dockerfile for Streamlit app --
#
# Base image
FROM python:3.9-slim
# Set working directory
WORKDIR /app
# Install system dependencies (including ffmpeg)
RUN apt-get update && apt-get install -y \
build-essential \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements file
COPY requirements.txt ./requirements.txt
# Install Python dependencies
RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Copy the entire app
COPY . .
# Create .streamlit directory and set permissions
RUN mkdir -p /app/.streamlit && \
chmod -R 755 /app/.streamlit
# Set environment variable for Streamlit config
ENV STREAMLIT_CONFIG_DIR=/app/.streamlit
# Expose the port that Streamlit runs on
EXPOSE 8501
# Add a health check
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
# Command to run the app
ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|