Spaces:
Runtime error
Runtime error
Jhun Brian Andam commited on
Commit ·
9304a3a
1
Parent(s): 80665a7
Overwrite with updated CNN Streamlit app
Browse filesFiles changed (2)
- Dockerfile+6-19
- src/cnn_app.py → cnn_app.pyRenamed
1234567891011121314151617181920212223242526272829303132333435FROM python:3.10-slim# Set environment variablesENV PYTHONDONTWRITEBYTECODE=1ENV PYTHONUNBUFFERED=1# Set working directoryWORKDIR /app# Install system dependenciesRUN apt-get update && apt-get install -y \build-essential \curl \git \&& rm -rf /var/lib/apt/lists/*# Copy app codeCOPY requirements.txt .COPY src/ ./src/# Important if model file is needed at runtimeCOPY model/ ./model/# Install Python dependenciesRUN pip install --upgrade pipRUN pip install --no-cache-dir -r requirements.txt# Expose Streamlit default portEXPOSE 7860# Health check endpoint (adjust if needed)# HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health || exit 1# Start the Streamlit appCMD ["streamlit", "run", "src/cnn_app.py", "--server.port=7860", "--server.address=0.0.0.0"]12345678910111213141516171819202122# DockerfileFROM python:3.10-slimENV PYTHONDONTWRITEBYTECODE=1ENV PYTHONUNBUFFERED=1WORKDIR /appCOPY requirements.txt ./COPY cnn_app.py ./COPY model/ ./model/RUN apt-get update && apt-get install -y \build-essential \&& rm -rf /var/lib/apt/lists/*RUN pip install --upgrade pipRUN pip install --no-cache-dir -r requirements.txtEXPOSE 7860CMD ["streamlit", "run", "cnn_app.py", "--server.port=7860", "--server.address=0.0.0.0"]
Dockerfile+6-19
src/cnn_app.py → cnn_app.pyRenamed