Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files12345671 unmodified line9101112131415161718192021FROM python:3.9-slimWORKDIR /appRUN apt-get update && apt-get install -y \build-essential \curl \1 unmodified linegit \&& rm -rf /var/lib/apt/lists/*COPY requirements.txt ./COPY src/ ./src/RUN pip3 install -r requirements.txtEXPOSE 8501HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/healthENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]1234567891011121 unmodified line1415161718192021222324252627282930313233FROM python:3.9-slim# Set the working directoryWORKDIR /app# Set STREAMLIT_HOME environment variable to a writable temporary directoryENV STREAMLIT_HOME="/tmp"# Install system dependenciesRUN apt-get update && apt-get install -y \build-essential \curl \1 unmodified linegit \&& rm -rf /var/lib/apt/lists/*# Copy requirements.txt and install Python dependenciesCOPY requirements.txt ./RUN pip3 install -r requirements.txt# Copy your Streamlit application file to the working directory# Assuming your main app file is named app.py and is at the root level of your projectCOPY app.py ./# Expose the port Streamlit will run onEXPOSE 8501# Healthcheck to ensure the app is runningHEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health# Define the entrypoint for the application# This runs the app.py scriptENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
Dockerfile+15-3