Smart-MP-Rekomend / Dockerfile
MarfinF's picture
- restart server
04c0c32
raw
history blame contribute delete
610 Bytes
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"]