Spaces:
Sleeping
Sleeping
File size: 385 Bytes
7c850fc | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # syntax=docker/dockerfile:1
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Install dependencies first (layer caching)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application source
COPY . .
# Expose the default API port
EXPOSE 7860
# Run the application
CMD ["sh", "-c", "uvicorn main:app --host 0.0.0.0 --port ${PORT:-7860}"]
|