Prediction / Dockerfile
Rivalcoder
Deploy FastAPI via Docker
bd2226d
raw
history blame
362 Bytes
# Use official Python slim image
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Copy requirements and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy all files
COPY . .
# Expose port for HF Spaces
EXPOSE 7860
# Run FastAPI via Uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]