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"]