File size: 421 Bytes
9965747
936b704
9965747
936b704
 
 
9965747
 
936b704
9965747
936b704
3317e3b
 
 
936b704
3317e3b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
FROM python:3.11-slim

ENV PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1

WORKDIR /app

COPY requirements.txt ./
RUN pip install --no-cache-dir --upgrade -r requirements.txt

COPY . .

# Hugging Face Spaces usually provides $PORT (commonly 7860). Expose 7860 and
# default to 7860 at runtime using bash expansion when $PORT is not set.
EXPOSE 7860

CMD ["bash", "-c", "uvicorn app:app --host 0.0.0.0 --port ${PORT:-7860}"]