Spaces:
Build error

README / Dockerfile
LORDBurnitdown's picture
Update Dockerfile
5207db5 verified
Raw History Blame Contribute Delete
1.04 kB
# Use official Python 3.10 image
FROM python:3.10-slim-bullseye
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PORT=7860
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
libssl-dev \
libffi-dev \
python3-dev \
git \
curl \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Install Python dependencies
COPY requirements.txt .streamlit==1.32.2
numpy==1.26.4
pandas==2.2.1
openai==1.30.1
huggingface-hub==0.22.2
requests==2.31.0
plotly==5.22.0
python-dotenv==1.0.1
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY . .
# Expose the port Streamlit runs on
EXPOSE 7860
# Health check
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
CMD curl --fail http://localhost:7860/_stcore/health || exit 1
# Run the application
CMD ["streamlit", "run", "app.py", "--server.port", "7860", "--server.address", "0.0.0.0"]