File size: 437 Bytes
ac59d2f
9052cef
5562e3e
 
cdbc6f5
9052cef
ac59d2f
9052cef
5b88ecf
4269a7b
9052cef
 
 
 
ac59d2f
9052cef
d9d9f74
9052cef
4269a7b
9052cef
4269a7b
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.10-slim

ENV TORCH_DISABLE_CUDA=1
ENV HF_HOME=/app/hf_cache
ENV TRANSFORMERS_CACHE=/app/hf_cache

WORKDIR /app

COPY requirements.txt .

RUN apt-get update && apt-get install -y git && \
    pip install --no-cache-dir -r requirements.txt && \
    rm -rf /var/lib/apt/lists/*

COPY . .

RUN mkdir -p /app/hf_cache && chmod -R 777 /app/hf_cache

EXPOSE 7860

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