Spaces:
Sleeping
Sleeping
File size: 595 Bytes
d8d4264 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # Use an official Python runtime as a parent image
FROM python:3.10-slim
# Set the working directory directly in the Hugging Face container
WORKDIR /app
# Copy the requirements file first to build the environment
COPY requirements.txt .
# Install the Python hacker packages we used
RUN pip install --no-cache-dir -r requirements.txt
# Copy all the HTML, CSS, JS, and Python scripts into the container
COPY . .
# Expose the standard port used by Hugging Face Spaces
EXPOSE 7860
# Command to run the FastAPI app via Uvicorn
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|