Bils's picture
Update Dockerfile
b0c0cea verified
raw
history blame contribute delete
988 Bytes
# Use a lightweight Python base image
FROM python:3.10-slim
# Set the working directory in the container
WORKDIR /app
# Install necessary system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
libsndfile1 \
ffmpeg \
curl \
&& rm -rf /var/lib/apt/lists/*
# Upgrade pip
RUN pip install --no-cache-dir --upgrade pip
# Copy the requirements file
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy all application files into the container
COPY . .
# Expose the default Streamlit port
EXPOSE 8501
# Add a health check for the application
HEALTHCHECK --interval=30s --timeout=5s --start-period=2m CMD curl --fail http://localhost:8501/_stcore/health || exit 1
# Set the command to run the Streamlit app
ENTRYPOINT ["streamlit", "run", "radio_imaging_app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableCORS=false", "--server.enableXsrfProtection=false"]