Spaces:
Sleeping
Sleeping
FROM python:3.10-slim | |
# Install system dependencies | |
RUN apt-get update && apt-get install -y \ | |
build-essential \ | |
gcc \ | |
libffi-dev \ | |
libpq-dev \ | |
libssl-dev \ | |
curl \ | |
&& apt-get clean && rm -rf /var/lib/apt/lists/* | |
# Set working directory | |
WORKDIR /app | |
# Copy dependency list | |
COPY requirements.txt . | |
# Install Python packages | |
RUN pip install --upgrade pip && pip install -r requirements.txt | |
# Copy app code | |
COPY . . | |
# Expose the correct port | |
EXPOSE 7860 | |
# Run Streamlit on Hugging Face's required port | |
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"] | |