feedbacks-scoring / Dockerfile
Matis Codjia
Scoring app
1d8c2e0
raw
history blame contribute delete
908 Bytes
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install dependencies
COPY requirements.txt ./
RUN pip3 install --no-cache-dir -r requirements.txt
# Copy application files
COPY app.py ./
COPY backend/ ./backend/
COPY frontend/ ./frontend/
# Create data directory
RUN mkdir -p /app/data
# Create .streamlit directory and empty secrets file to avoid warnings
RUN mkdir -p /app/.streamlit && touch /app/.streamlit/secrets.toml
# Expose Streamlit port
EXPOSE 7860
# Health check for Hugging Face Spaces
HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health
# Run the application
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.enableCORS=false", "--server.enableXsrfProtection=false"]