Spaces:
Sleeping
Sleeping
File size: 569 Bytes
6fe0ad6 78e80ec 6fe0ad6 78e80ec 6fe0ad6 78e80ec 6fe0ad6 78e80ec 6fe0ad6 78e80ec 6fe0ad6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# Use official lightweight Python image
FROM python:3.11-slim
# Create working directory
WORKDIR /app
# Copy project
COPY . /app
# Install OS packages
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
sqlite3 \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Hugging Face Spaces runtime port
ENV PORT=7860
# Expose port (not required on Spaces but okay)
EXPOSE 7860
# Start FastAPI
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|