Spaces:
Sleeping
Sleeping
File size: 645 Bytes
92956ef 15afac8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # Use an official Python runtime as a parent image
FROM python:3.10
# Set the working directory in the container
WORKDIR /app
# Copy the requirements file into the container
COPY requirements.txt .
# Install the heavy ML libraries and your dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of your project code into the container
COPY . .
# Expose port 7860 (Hugging Face strictly requires this port)
EXPOSE 7860
# Move into the back_end folder before starting the server
WORKDIR /app/back_end
# Run the app directly from inside that folder
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|