File size: 606 Bytes
9be6c71
 
e588341
 
 
9be6c71
 
 
e588341
 
 
 
 
 
 
 
9be6c71
 
 
 
 
 
 
 
 
 
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
FROM python:3.10-slim

ENV PYTHONDONTWRITEBYTECODE=1 \
    PYTHONUNBUFFERED=1

WORKDIR /app


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

RUN pip install --no-cache-dir huggingface_hub


RUN python -c "from huggingface_hub import snapshot_download; snapshot_download(repo_id='apple/MobileCLIP2-S0', local_dir='/app/model', local_dir_use_symlinks=False, allow_patterns=['*.pt'])"

COPY requirements.txt .

RUN pip install --no-cache-dir -r requirements.txt

COPY ./app /app/app

EXPOSE 8000

CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]