Spaces:
Sleeping
Sleeping
File size: 544 Bytes
a905106 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# Use an official lightweight Python image.
FROM python:3.9-slim
# Set the working directory.
WORKDIR /app
# Copy the requirements file and install dependencies.
COPY requirements.txt .
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# Copy your application code.
COPY . .
# Expose the port provided by the $PORT environment variable.
EXPOSE 7860
# Start your FastAPI app using uvicorn.
# The $PORT environment variable is provided by Hugging Face Spaces.
CMD sh -c "uvicorn app:app --host 0.0.0.0 --port ${PORT:-7860}"
|