File size: 687 Bytes
c67c2e9
ce6cc1f
 
 
c67c2e9
 
 
 
ce6cc1f
 
 
 
c67c2e9
 
 
 
 
 
 
 
 
 
 
 
ce6cc1f
 
 
c67c2e9
 
ce6cc1f
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
31
FROM pytorch/pytorch:2.3.0-cuda12.1-cudnn8-runtime

WORKDIR /app

ENV PYTHONUNBUFFERED=1 \
    HF_HUB_DISABLE_SYMLINKS_WARNING=1

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

RUN pip install --no-cache-dir --upgrade pip && \
    pip install --no-cache-dir \
      fastapi \
      uvicorn[standard] \
      "huggingface-hub>=0.23.2" \
      "transformers==4.44.2" \
      accelerate \
      bitsandbytes \
      torchvision \
      pillow \
      requests \
      flash-attn --no-build-isolation

COPY app.py /app/app.py

EXPOSE 7860

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