Spaces:
Sleeping
Sleeping
# Use an official Python base image | |
FROM python:3.9-slim | |
# Set the working directory | |
WORKDIR /app | |
# Copy the requirements file | |
COPY requirements.txt . | |
# Install dependencies | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Copy the application code from the 'app' directory | |
COPY app/ . | |
# Expose the port Hugging Face requires | |
EXPOSE 7860 | |
# Run the FastAPI app with uvicorn on the correct port | |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |