Upload folder using huggingface_hub
Browse filesFiles changed (2)
- Dockerfile+8-13
- requirements.txt+2-3
123456789101112131415161718192021FROM python:3.9-slimWORKDIR /appRUN apt-get update && apt-get install -y \build-essential \curl \software-properties-common \git \&& 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"]12345678910111213141516# Use a minimal base image with Python 3.9 installedFROM python:3.9-slim# Set the working directory inside the container to /appWORKDIR /app# Copy all files from the current directory on the host to the container's /app directoryCOPY . .# Install Python dependencies listed in requirements.txtRUN pip3 install -r requirements.txt# Define the command to run the Streamlit app on port 8501 and make it accessible externallyCMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]# NOTE: Disable XSRF protection for easier external access in order to make batch predictions
123altairpandasstreamlit12requests==2.32.3streamlit==1.45.0
Dockerfile+8-13
requirements.txt+2-3