Spaces:
Runtime error
Runtime error
File size: 615 Bytes
680fa2b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | FROM python:3.11-slim
WORKDIR /code
# Install system libraries needed for database drivers
RUN apt-get update && apt-get install -y \
build-essential \
libpq-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install dependencies in binary mode to avoid compiler blocks
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt --only-binary :all:
# Copy the rest of the application files
COPY . /code
# Hugging Face Spaces routes internal traffic to port 7860
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|