Spaces:
Sleeping
Sleeping
File size: 610 Bytes
cbf1942 1eae99a 47bc4fb 2cb44f8 cb23c4c 04c0c32 e6a9f3e 58ea9d8 47bc4fb cbf1942 acdbe6d cbf1942 f4ac0cd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
FROM python:3.9-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install -U transformers accelerate peft huggingface_hub
RUN pip install 'uvicorn[standard]'
# transformer cache restart docker
ENV TRANSFORMERS_CACHE=/app/cache
ENV HF_HOME=/app/hf_cache
RUN mkdir -p /app/cache /app/hf_cache
RUN python -c "from transformers import pipeline; pipeline('zero-shot-classification', model='MarfinF/marfin_emotion', force_download=True)"
COPY . .
COPY frontend ./frontend
EXPOSE 7860
CMD ["uvicorn", "backend.app:app", "--host", "0.0.0.0", "--port", "7860"]
|