File size: 474 Bytes
74f1127
 
8375b63
 
74f1127
 
 
 
 
 
 
8375b63
 
 
 
74f1127
2603ece
74f1127
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM python:3.11-slim

ENV PYTHONUNBUFFERED=1 \
    PIP_NO_CACHE_DIR=1

WORKDIR /app

COPY requirements.txt /app/requirements.txt
COPY hf_backend /app/hf_backend
COPY bilingual_book_maker /app/bilingual_book_maker

RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        calibre \
    && rm -rf /var/lib/apt/lists/*

RUN pip install -r /app/requirements.txt

EXPOSE 7860

CMD ["uvicorn", "hf_backend.app:app", "--host", "0.0.0.0", "--port", "7860"]