Spaces:
Sleeping
Sleeping
| FROM python:3.10-slim | |
| RUN apt-get update \ | |
| && apt-get install -y --no-install-recommends \ | |
| libglib2.0-0 libsm6 libxrender1 libxext6 \ | |
| libgl1 libgomp1 \ | |
| libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 \ | |
| libharfbuzz0b libharfbuzz-subset0 libgdk-pixbuf-2.0-0 libcairo2 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt \ | |
| # kraken pins torch~=2.1/numpy~=1.23 in metadata but runs fine on our | |
| # torch 2.2.2/numpy 1.26; its real deps are pinned in requirements.txt. | |
| && pip install --no-cache-dir --no-deps kraken==5.2.9 | |
| COPY . . | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |