Smart-MP-Rekomend / Dockerfile
MarfinF's picture
- add song genre and delete folder music & adjust docker
dda6bdd
raw
history blame
616 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]'
# βœ… Set environment variable untuk cache model & tokenizers
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')"
COPY . .
COPY frontend ./frontend
EXPOSE 7860
CMD ["uvicorn", "backend.app:app", "--host", "0.0.0.0", "--port", "7860"]