Spaces:
Sleeping
Sleeping
FROM python:3.10-slim | |
WORKDIR /app | |
RUN mkdir -p /app/cache && chmod -R 777 /app/cache | |
ENV HF_HOME=/app/cache \ | |
TRANSFORMERS_CACHE=/app/cache \ | |
HF_DATASETS_CACHE=/app/cache \ | |
XDG_CACHE_HOME=/app/cache | |
RUN apt-get update && apt-get install -y \ | |
git \ | |
&& rm -rf /var/lib/apt/lists/* | |
COPY requirements.txt . | |
RUN pip install --no-cache-dir -r requirements.txt | |
RUN python -c "\ | |
from sentence_transformers import SentenceTransformer; \ | |
SentenceTransformer('law-ai/InLegalBERT')" | |
COPY . . | |
ENV PYTHONUNBUFFERED=1 | |
EXPOSE 7860 | |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |