smallm_inf / Dockerfile
sidmaz666's picture
Update Dockerfile
ce49fae verified
raw
history blame contribute delete
591 Bytes
# Use a lightweight Python image
FROM python:3.10-slim
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY app.py .
# Expose the default Hugging Face Space port (7860)
EXPOSE 7860
# Hugging Face Spaces expects the app to run on port 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]