Spaces:
Runtime error
Runtime error
File size: 781 Bytes
cb9233a 93ed878 cb9233a 93ed878 cb9233a 93ed878 cb9233a 93ed878 cb9233a 93ed878 cb9233a 93ed878 cb9233a 93ed878 cb9233a 93ed878 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
FROM python:3.13.5-slim
# Set the working directory inside the container
WORKDIR /app
# Install necessary dependencies
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy the requirements file to the working directory
COPY requirements.txt ./
# Copy the FastAPI application files
COPY src/ ./src/
# Install Python dependencies from requirements.txt
RUN pip3 install -r requirements.txt
# Expose the port that the FastAPI app will run on
EXPOSE 7860
# Health check for FastAPI (adjust if needed)
HEALTHCHECK CMD curl --fail http://localhost:7860/health || exit 1
# Set the entry point to run the FastAPI app with uvicorn
ENTRYPOINT ["uvicorn", "src.app:app", "--host", "0.0.0.0", "--port", "7860"]
|